我el6.href和el7.href不起作用,一些JavaScript不起作用
如果我把el6.href和el7.href在el4.href的頂部和el5.href,但作品後果el4。和el5將無法正常工作, 任何提示?
腳本
el4 = document.getElementById("edit_href");
el5 = document.getElementById("delete_href");
el6 = document.getElementById("approve_href");
el7 = document.getElementById("deny_href");
el4.href = "../article/submit-article.php?";
el5.href = "myaccount.php?mydraft=true&delete=true";
el6.href = "myaccount.php?rec_approved=true&approve=true";
el7.href = "myaccount.php?rec_denied&deny=true";
PHP
if(isset($_GET['mydraft']))
{echo"
< href='' id=edit_href >edit</a>
<a href='' id=delete_href >delete</a>";
}
if ((isset($_GET['rec_waiting'])) || (isset($_GET['rec_denied'])))
{echo"
<a href='' id=approve_href >approve</a>";
if(!isset($_GET['rec_denied']))
{echo"
<a href='' id=deny_href >deny </a>";
}
}
感謝@Myd它的工作代碼! – 2012-08-07 06:45:12