2012年4月25日

摘要: <html> <head> <script type="text/javascript"> var t1=document.getElementById("txt1"); function isFocus(){ if(document.activeElement.id=='txt2'){ alert('txt2获得焦点'); } else{ alert('txt2未获得焦点'); } } ... 阅读全文
posted @ 2012-04-25 15:48 BlueAmbition 阅读(8569) 评论(0) 推荐(0) 编辑
 
摘要: <script language='javascript'> document.onkeydown=function(){ if (event.keyCode == 13){ alert('回车键.'); } else{ alert('你按错了键.'); } }</script> 阅读全文
posted @ 2012-04-25 15:44 BlueAmbition 阅读(20558) 评论(0) 推荐(0) 编辑