|M| 突然想到了一个JS问题 大家看怎么做 打开网页的时候当按住CTRL键时 div1 显示 松开时 div1隐藏 呵呵 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script type='text/jscript'> window.document.onkeydown= function() { if(event.ctrlKey ) { document.getElementById("div1").style.display = ""; }else document.getElementById("div1").style.display = "none"; } window.document.onkeyup= function() { document.getElementById("div1").style.display = "none"; } </script> 捕捉onkeydown和onkeyup事件document.onkeydown = keydownfunction keydown(){ if(event.keyCode==17){ //显示你的div }}后面自己写了 <div id="div1" style="background-color:red;width:100px;height:100px;display:none">aaaa</div> repeater嵌套问题,急 水晶报表打印,出现选择数字证书 怎样循环大类里面在循环小类呢? 80分求一个多线程的例子,马上给分 请问关于ReportViewer的帮助文档或资料、丛书哪里有或推荐? 求助学习ASP.NET的经验 dataGrid 显示的问题 有没有下拉菜单式的日期选择控件? 遇到这样一个C#的实现 一个关于页面数据传递的问题,在线等,搞定结 网站发布问题~~求助 用了master框架以后,gridview分页触发不了,有人知道原因吗?
window.document.onkeydown= function()
{
if(event.ctrlKey )
{
document.getElementById("div1").style.display = "";
}else
document.getElementById("div1").style.display = "none";
}
window.document.onkeyup= function()
{
document.getElementById("div1").style.display = "none";
}
</script>
document.onkeydown = keydownfunction keydown(){
if(event.keyCode==17){
//显示你的div
}
}
后面自己写了
aaaa
</div>