今天解決一BUG,在ie6下點a標簽不會submit,原來在a的href上寫的是javascript:void(0);把javascript:void(0)改成###,問題解決.但是如果這個html是程序員噴的,那可就要走大流程了.咨詢大師,於是留下了這千古絕唱.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript"> window.onload = function() { document.getElementById('a1').onclick = function() { setTimeout(function() { document.forms[0].submit(); }, 1); } } </script> </head> <body> <form action="VoteSubmit.aspx" id="form1"> <input type="text" id="t1" /> </form> <a href="javascript:void(0)" id="a1">aaa</a> </body> </html>