我想在网页中加入一段"进入备案中心"
就是<a href="http://www.bj.cyberpolice.cn" class="white">进入备案中心</a>然后就是这段代码,愿意是电击右键进入备案中心,我想在“进入备案中心”点击右键后进入,不知如何写。谢谢大家!
<script language="javascript">
if (navigator.appName.indexOf("Internet Explorer") != -1)
document.onmousedown = noSourceExplorer;
function noSourceExplorer()
{
if (event.button == 2 | event.button == 3)
{
alert("进入备案中心!");
location.replace("http://www.bj.cyberpolice.cn");
}
}
</script>
就是<a href="http://www.bj.cyberpolice.cn" class="white">进入备案中心</a>然后就是这段代码,愿意是电击右键进入备案中心,我想在“进入备案中心”点击右键后进入,不知如何写。谢谢大家!
<script language="javascript">
if (navigator.appName.indexOf("Internet Explorer") != -1)
document.onmousedown = noSourceExplorer;
function noSourceExplorer()
{
if (event.button == 2 | event.button == 3)
{
alert("进入备案中心!");
location.replace("http://www.bj.cyberpolice.cn");
}
}
</script>
window.onload = function (){
var link = document.getElementById("backUpCenter");
if (navigator.appName.indexOf("Internet Explorer") != -1)
{
link.attachEvent("oncontextmenu", function () {
alert("进入备案中心!");
location.href='http://www.120.com';
return false;
});
}
}
</script>
<a href="http://www.110.com" class="white" id="backUpCenter">进入备案中心</a>
href="http://www.110.com" class="white">进入备案中心</a>