javascript

位置:IT落伍者 >> javascript >> 浏览文章

用JavaScript代码给网页热键功能


发布日期:2018年08月12日
 
用JavaScript代码给网页热键功能

<html>

<head>

<script language=javascript>

<!

function issueCommand(x){

if (documentlayers)

{

if (xwhich==||xwhich==)

windowclose();

else if (eventkeyCode==||eventkeyCode==)

selfprint();

else if (eventkeyCode==||eventkeyCode==)

alert(Sorry this is the only song in the List);

}

else if (documentall){

if (eventkeyCode==||eventkeyCode==)

windowclose();

else if (eventkeyCode==||eventkeyCode==)

selfprint();

else if (eventkeyCode==||eventkeyCode==)

alert(Sorry this is the only song in the List);

}

}

//>

</script>

</head>

<body>

<script language=javascript>

<!

if (documentlayers)

documentcaptureEvents(EventKEYPRESS);

documentonkeypress=issueCommand

>

</script>

<font size=><u>P</u>ress P</font><p>

<font size=><u>N</u>ext One</font><p>

<font size=><u>C</u>lose Window</font><p>

</body>

</html>

上一篇:Javascript实现窗口最大化的严格定义

下一篇:Taglib原理和实现:再论El和JSTL标签