81,091
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE HTML>
<html>
<head>
<meta charset="gb2312" />
<title></title>
</head>
<body>
<form action="http://www.baidu.com" method="post" id="test">
<a href="" id="a">链接</a>
</form>
<script>
function $(el){
return typeof el == 'string' ? document.getElementById(el) : el;
}
$('a').onclick = function(){
$('test').submit();
return false;
}
</script>
</body>
</html>