一些很實用且必用的小腳本代碼第3/5頁
更新時間:2006年08月12日 00:00:00 作者:
腳本14:接收鍵盤指令的腳本
按A就會跳轉到地圖名片的網頁,請按A
<SCRIPT language="JavaScript">
<!--
var hotkey=97
var destination="http://mc.mapabc.com"
if (document.layers)
document.captureEvents(Event.KEYPRESS)
function backhome(e){
if (document.layers){
if (e.which==hotkey)
window.location=destination
}
else if (document.all){
if (event.keyCode==hotkey)
window.location=destination
}
}
document.onkeypress=backhome
onkeydown="javascript:onenter();"
function onenter(){
if(event.keyCode==13){
alert("回車");
}
}
</SCRIPT>
function onenter(){
if(event.keyCode==13){
alert("回車");
}
}
</SCRIPT>
onkeydown="javascript:onenter();"
function onenter(){
if(event.keyCode==13){
alert("回車");
}
}
</SCRIPT>
function onenter(){
if(event.keyCode==13){
alert("回車");
}
}
</SCRIPT>
onkeydown="javascript:onenter();"
function onenter(){
if(event.keyCode==13){
alert("回車");
}
}
</SCRIPT>
function onenter(){
if(event.keyCode==13){
alert("回車");
}
}
</SCRIPT>
onkeydown="javascript:onenter();"
function onenter(){
if(event.keyCode==13){
alert("回車");
}
}
</SCRIPT>
function onenter(){
if(event.keyCode==13){
alert("回車");
}
}
</SCRIPT>
相關文章
return false;和e.preventDefault();的區(qū)別
Have you ever seen those two things (in the title) being used in jQuery? Here is a simple2010-07-07在Javascript操作JSON對象,增加 刪除 修改的簡單實現
下面小編就為大家?guī)硪黄贘avascript操作JSON對象,增加 刪除 修改的簡單實現。小編覺得挺不錯的,現在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2016-06-06JavaScript模擬深藍vs卡斯帕羅夫的國際象棋對局示例
這篇文章主要介紹了JavaScript模擬深藍vs卡斯帕羅夫的國際象棋對局示例,使用javascript較為逼真的模擬出了國際象棋對弈的場景,需要的朋友可以參考下2015-04-04javascript中的event loop事件循環(huán)詳解
這篇文章主要給大家介紹了關于javascript中event loop事件循環(huán)的相關資料,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2018-12-12JavaScript必知必會(二) null 和undefined
這篇文章主要介紹了JavaScript必知必會(二) null 和undefined的相關資料,非常不錯具有參考借鑒價值,需要的朋友可以參考下2016-06-06