< script language = " javascript " type = " text/javascript " >
document.oncontextmenu = function ()
{
var div = document.getElementById( " hdiv " );
div.style.pixelLeft = event.clientX;
div.style.pixelTop = event.clientY;
div.style.display = " block " ;
return false ;
}
script >
【自定义鼠标右键】
< div id ="hdiv" align ="center" style ="position:absolute; display:none; background-color:#EFF8FF; height:300px; width:100px; top:0px; left:0px; " >
< fieldset style ="border-color:#96C2EF; border-width:1px; border-style:solid; " >
< legend > 潍科 legend >
< table width ="100%" bgcolor ="#ECE9D8" style ="cursor:pointer; " >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 关闭菜单 td >
tr >
< tr >< td >< hr size ="0" color ="#C0C0C0" noshade ="noshade" > td > tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 首 题 td >
tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 上一题 td >
tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 下一题 td >
tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 末 题 td >
tr >
< tr >< td >< hr size ="0" color ="#C0C0C0" noshade ="noshade" > td > tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 标记此题 td >
tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 取消标记 td >
tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 答题状态 td >
tr >
< tr >< td >< hr size ="0" color ="#C0C0C0" noshade ="noshade" > td > tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 全 部 td >
tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 单 选 td >
tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 多 选 td >
tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 填 空 td >
tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 判 断 td >
tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 其 它 td >
tr >
< tr >< td >< hr size ="0" color ="#C0C0C0" noshade ="noshade" > td > tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 保存 td >
tr >
< tr onMouseOver ="this.bgColor='FFFFFF'" onMouseOut ="this.bgColor='#ECE9D8'" >
< td align ="center" onClick ="hdiv.style.display='none'" > 交卷 td >
tr >
table >
fieldset >
div >
推荐阅读
- 操作系统|[译]从内部了解现代浏览器(1)
- web网页模板|如此优秀的JS轮播图,写完老师都沉默了
- JavaScript|vue 基于axios封装request接口请求——request.js文件
- vue.js|vue中使用axios封装成request使用
- JavaScript|JavaScript: BOM对象 和 DOM 对象的增删改查
- JavaScript|JavaScript — 初识数组、数组字面量和方法、forEach、数组的遍历
- JavaScript|JavaScript — call()和apply()、Date对象、Math、包装类、字符串的方法
- JavaScript|JavaScript之DOM增删改查(重点)
- javascript|vue使用js-xlsx导出excel,可修改格子样式,例如背景颜色、字体大小、列宽等
- javascript|javascript中的数据类型转换