日期:2014-05-17 浏览次数:20638 次
<!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>