好吧,我正在编写一个可以避免编辑学分的脚本,这是我的总页面代码:
//start the script after loading the page
$(document).ready(function(){
//get the elements from page
var urlvalue1 = document.getElementById("#mycredit").href;
//correct link
if (urlvalue1 == "http://themedaddy.net" )
{window.location.replace("#");
}
//edited link
else{
window.location.replace("http://themedaddy.net");
}
但即使我在正文部分添加了以下 html 代码并将 jquery 脚本链接到它,它也不起作用。
<a href="http://themedaddy444444.net" id="mycredit">ThemeDaddy</a>
根据脚本,它必须需要重定向,因为链接值不令人满意。