<!DOCTYPE html>
	<html>
	
	<head>
		<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
		<style>
			a {
				text-decoration: none;/*去除网页内所有<a>标签链接的下划线*/
			}
	
			div.menu {/*设置右键菜单样式*/
				background-repeat: no-repeat;
				background-position: center center;
				background-size: cover;
				background-color: rgb(214, 214, 214);/*菜单背景颜色*/
				font-size: 15px !important;/*字体大小*/
				width: 150px;/*菜单宽度*/
				-moz-box-shadow: 1px 1px 3px rgba(0, 0, 0, .3);
				box-shadow: 1px 1px 3px rgba(0, 0, 0, .3);
				position: fixed;
				display: none;/*设置定位(不设置的话下面设置的优先级无法起作用)*/
				z-index: 10000;/*设置重叠优先级,数字越大优先级越高*/
				opacity: 0.9;
			}
	
			div.menu ul {/*设置menu类里面ul列表的样式(ul标签用于定义无需列表)*/
				list-style-type: none;
				list-style-position: outside;
				margin: 0px;
				padding: 0px;
				display: block
			}
	
			div.menu ul li {/*设置menu类里面ul中li列表的样式(ul标签与li标签一起使用来创建无序列表)*/
				margin: 0px;
				padding: 0px;/*设置外边距为0像素*/
				line-height: 35px;/*行高为35像素*/
				border-bottom: 1px solid rgb(0, 0, 0);/*设置每行下面的分割线宽为1像素,颜色为黑色*/
			}
	
			div.menu ul li a {/*设置menu类里面ul里li中a标签的样式*/
				color: rgb(0, 0, 0);/*颜色设为黑色*/
				padding: 0 15px;/*外边距为15px*/
				display: block
			}
	
			div.menu ul li a:hover {
				color: #fff;/*设置当鼠标移至菜单上字体变化的颜色(由黑色变为白色)*/
				background: rgba(163, 163, 163, 0.88)/*设置当鼠标移至菜单上变化的颜色*/
			}
		</style>
		<script type="text/javascript">
			function CopyText() {//定义复制文本
				document.execCommand('copy');
			};
			function OriginalRight() {//定义原始右键
				window.oncontextmenu = function (right) {
					right.stopPropagation();
				}
				var menu = document.getElementById("right-menu");
				menu.style.display = "none";
			};
			function openWindow(url,w,h){
				var left=(window.screen.width-w)/2;
				var top=(window.screen.height-h)/2;
				window.open(url, "", "height="+h+", width="+w+",top="+top+",left="+left+", toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no");
			}
			$(function () {
				window.oncontextmenu = function (right) {
					right.preventDefault(); //阻止浏览器自带的右键菜单显示
					var menu = document.getElementById("right-menu");
					menu.style.display = "block"; //将自定义的右键菜单显示出来
					menu.style.left = right.clientX + "px"; //设置位置,跟随鼠标
					menu.style.top = right.clientY + "px";
				}
				window.onclick = function (right) { //点击窗口,右键菜单隐藏
					var menu = document.getElementById("right-menu");
					menu.style.display = "none";
				}
			});
	
	
		</script>
	</head>
	
	<body>
		<div class="menu" id="right-menu" style="left: 772px; top: 138px; display: none;">
			<ul>
				<li><a href="javascript:void(0);" onclick="CopyText();"><span>复制文字</span></a></li>
				<li><a href="javascript:window.location.reload();"><span>刷新页面</span></a><li>
				<li><a href="javascript:history.go(1);"><span>前进一页</span></li>
				<li><a href="javascript:history.go(-1);"><span>后退一页</span></a></li>
				<li><a href="about1.html"><span>关于本站</span></a></li><!--about1.html的链接可以自己替换-->
				<li><a onclick=openWindow("images/pay1.png","523","294")><span>赞助本站</span></a></li><!--openWindow里面的文件路径可以自己替换,后面两个分别是设置长和宽的-->
				<li><a href="javascript:void(0);" onclick="OriginalRight();"><span>原始右键</span></a></li>
			</ul>
		</div>
		<center><h3>右键试试看哦~</h3></center>
	</body>
	
	</html>