代码驿站移动版
频道导航
HTML/Xhtml
CSS
JavaScript
HTML5
PHP教程
ASP.NET
正则表达式
AJAX
ThinkPHP
Yii
MySQL
MariaDB
Oracle
MongoDB
Redis
DedeCMS
PHPCMS
帝国CMS
WordPress
Discuz
其它CMS
Zend Studio
Sublime
Notepad
Dreamweaver
Windows
Linux
Nginx
Apache
IIS
CentOS
Ubuntu
Debian
网站优化
工具资源
PHP源码
ASP.NET源码
其它源码
图标素材
按钮素材
字体素材
DedeCMS模板
帝国CMS模板
PHPCMS模板
WordPress模板
Discuz!模板
单页模板
开发软件下载
服务器软件下载
广告投放
联系我们
版权申明
软件编程
网页前端
移动开发
数据库
服务器
脚本语言
PHP代码
JAVA代码
Python代码
Android代码
当前位置:
主页
>
网页前端
>
JavaScript代码
>
textbox右键菜单
时间:2020-10-21 11:09:15 | 栏目:
JavaScript代码
| 点击:次
<P><META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=gb2312"><html><head><title>Page 1</title></head><STYLE type=text/css>A:link { TEXT-DECORATION: none}A:visited { TEXT-DECORATION: none}A:active { TEXT-DECORATION: none}A:hover { TEXT-DECORATION: underline overline}BODY { COLOR: #000000; FONT-SIZE: 9pt}TH { FONT-SIZE: 9pt}TD { FONT-SIZE: 9pt}DIV { FONT-SIZE: 9pt}</STYLE></P> <P><STYLE type=text/css>BODY { scrollbar-face-color: #C0C0C0; 轴面颜色: #FFFFFF; 箭头颜色: #C0C0C0; 轴面左边角颜色: #000000; 左立体边颜色: #808080; 轴面右边角颜色: #FFFFFF; 右立体边颜色: #E0E0E0; 轴轨道颜色: }</STYLE><!--滚动条颜色--><STYLE>.skin0 { BACKGROUND-COLOR: menu; BORDER-BOTTOM: black 2px solid; BORDER-LEFT: black 2px solid; BORDER-RIGHT: black 2px solid; BORDER-TOP: black 2px solid; CURSOR: default; FONT-FAMILY: Verdana; LINE-HEIGHT: 20px; POSITION: absolute; TEXT-ALIGN: left; VISIBILITY: hidden; WIDTH: 200px}.skin1 { BACKGROUND-COLOR: menu; BORDER-BOTTOM: buttonhighlight 2px outset; BORDER-LEFT: buttonhighlight 2px outset; BORDER-RIGHT: buttonhighlight 2px outset; BORDER-TOP: buttonhighlight 2px outset; CURSOR: default; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 10pt; POSITION: absolute;z-index:9; TEXT-ALIGN: left; VISIBILITY: hidden; WIDTH: 120px}.menuitems { FONT-SIZE: 9pt; PADDING-LEFT: 15px; PADDING-RIGHT: 10px}</STYLE></P> <P><SCRIPT language=JavaScript1.2> </P> <P>var menuskin = "skin1"; // skin0, or skin1 var display_url = 0; // Show URLs in status bar? var selInputOb = null;function showmenuie5() { selInputOb = event.srcElement;var rightedge = document.body.clientWidth-event.clientX; var bottomedge = document.body.clientHeight-event.clientY; if (rightedge < ie5menu.offsetWidth) ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth; else ie5menu.style.left = document.body.scrollLeft + event.clientX; if (bottomedge < ie5menu.offsetHeight) ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight; else ie5menu.style.top = document.body.scrollTop + event.clientY; ie5menu.style.visibility = "visible"; return false; } function hidemenuie5() { ie5menu.style.visibility = "hidden"; } function highlightie5() { if (event.srcElement.className == "menuitems") { event.srcElement.style.backgroundColor = "highlight"; event.srcElement.style.color = "white"; if (display_url) window.status = event.srcElement.url; } } function lowlightie5() { if (event.srcElement.className == "menuitems") { event.srcElement.style.backgroundColor = ""; event.srcElement.style.color = "black"; window.status = ""; } } function jumptoie5() { if (event.srcElement.className == "menuitems") { if (event.srcElement.getAttribute("target") != null) window.open(event.srcElement.url, event.srcElement.getAttribute("target")); else window.location = event.srcElement.url; } } </SCRIPT><!--End user's custom HTML/Script!--><body bgcolor="#ffffff" onload="PageLoaded()" onunload="PageUnloaded()"><!--User's custom HTML/Script!--><DIV class=skin0 id=ie5menu onclick=jumptoie5(); onmouseout=lowlightie5() onmouseover=highlightie5()> <DIV class=menuitems url="javascript:history.back();">返回</DIV> <HR><div class=menuitems url="javascript:selInputOb.value='我需要的';void(0);">输入数据</div> <DIV class=menuitems url="javascript:history.go(1);">下一页</DIV></div><form onsubmit="OnWebFormSubmit()"><input type="text" name="EditBox0" ID="EditBox0" tabindex="1" accesskey="" style=" "><input type="text" name="EditBox1" ID="EditBox1" tabindex="1" accesskey="" style=" "><SCRIPT language=JavaScript1.2> if (document.all && window.print) { ie5menu.className = menuskin; document.forms[0].EditBox0.oncontextmenu = showmenuie5; document.forms[0].EditBox1.oncontextmenu = showmenuie5; document.body.onclick = hidemenuie5; } </SCRIPT></form></body></html>
[Ctrl+A 全选 注:
引入外部Js需再刷新一下页面才能执行
]
您可能感兴趣的文章:
JavaScript常见事件处理程序实例总结
url传递的参数值中包含&时,url自动截断问题的解决方法
Javascript的匿名函数小结
javascript上下左右定时滚动插件
Javascript别踩白块儿(钢琴块儿)小游戏实现代码
相关文章
11-08
兼容浏览器的js事件绑定函数(详解)
11-27
Javascript实例教程(19) 使用HoTMetal(2)
11-23
Webpack中loader打包各种文件的方法实例
10-05
javascript判断图片是否加载完成的方法推荐
11-22
在javascript中执行任意html代码的方法示例解读
JQuery
VUE
AngularJS
MSSql
MySQL
MongoDB
Redis
Linux
Tomcat
Nginx
网站首页
广告投放
联系我们
版权申明
联系站长