摘要: 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html;ch 阅读全文
posted @ 2012-05-28 17:03 小猩猩君 阅读(495) 评论(0) 推荐(0) 编辑
摘要: 1 var link = document.getElementById("myLink"); 2 //only IE 3 link.onclick = function() { 4 window.event.returnValue = false; 5 }; 6 7 //DOM0 8 link.onclick = function(event) { 9 event.preventDefault();10 };11 12 //DOM事件监听13 link.addEventListener("click", function(event) {14 even 阅读全文
posted @ 2012-05-28 10:17 小猩猩君 阅读(139) 评论(0) 推荐(0) 编辑