日期:2014-05-16 浏览次数:20327 次
Html代码 1.<a href=”javaScript:void(0)” onClick=”doSomething();”>doSomethind</a> <a href=”javaScript:void(0)” onClick=”doSomething();”>doSomethind</a>
Html代码 1.javascript:void (expression) 2.javascript:void expression javascript:void (expression) javascript:void expression
Html代码 1.<a href=”javascript:void(0)”>单击此处什么也不会发生</a> <a href=”javascript:void(0)”>单击此处什么也不会发生</a>
Html代码 1.<a href=”javascript:void(document.form.submit())”> <a href=”javascript:void(document.form.submit())”>
Html代码 1.<script type="text/javascript"> 2. function goUrl(x){ 3. window.location.href=x; 4. } 5.</script> 6. 7.<a href="javascript:;" onclick="javascript:goUrl('http://www.sina.com');">跳转1</a> 8. 9.<a href="javascript:void(0);" onclick="javascript:goUrl('http://www.sina.com');">跳转2</a> 10. 11.<a href="javascript:void(0);" onclick="javascript:goUrl('http://www.sina.com');return false;">跳转3</a> 12. 13.<a href="#" onclick="javascript:goUrl('http://www.sina.com');">跳转4</a> 14. 15.<a href="###" onclick="javascript:goUrl('http://www.sina.com');">跳转5</a> <script type="text/javascript"> function goUrl(x){ window.location.href=x; } </script> <a href="javascript:;" onclick="javascript:goUrl('http://www.sina.com');">跳转1</a> <a href="javascript:void(0);" onclick="javascript:goUrl('http://www.sina.com');">跳转2</a> <a href="javascript:void(0);" onclick="javascript:goUrl('http://www.sina.com');return false;">跳转3</a> <a href="#" onclick="javascript:goUrl('http://www.sina.com');">跳转4</a> <a href="###" onclick="javascript:goUrl('http://www.sina.com');">跳转5</a>