簡體   English   中英

僅適用於索引頁?

[英]Works only on index page?

有了這個社區的幫助,我將此代碼放在了主框架頁面上。 在首頁上所有鏈接都可以訪問,一切正常。 在網站的其余部分,如果用戶未登錄,則所有鏈接均按原樣顯示,但鏈接已失效。 您可以將鼠標懸停在它們上方,它們會響應,但是單擊時什么也沒有發生。 不知道為什么會這樣。

<span id="LoginName1"><?php
if (isset($_SESSION['username']))
{

?>
<div id="wb_Text2" style="">
<span style="color:#FFFFFF;font-family:Tahoma;font-size:13px;"><a href="javascript:displaylightbox('./members/Edit_Profile.php',{width:620,height:710})" target="_self" class="style5">Profile</a></span>
</div>

<?php
}
else
{
    ?>
<div id="wb_Text4" style="">
<span style="color:#FFA500;font-family:Tahoma;font-size:13px;line-height:19px;"><a href="javascript:displaylightbox('./members/Create_Account.php',{width:620,height:710})" target="_self" title="Create New Account" class="style5">REGISTER</a><br><a href="javascript:displaylightbox('./members/Forgot_Password.php',{width:350,height:275})" target="_self" title="Forgot Password" class="style5">Forgot Password?</a><br></span><span style="color:#000000;font-family:Tahoma;font-size:27px;line-height:31px;"><strong><a href="javascript:displaylightbox('./members/Log-In.php',{width:490,height:370})" target="_self" class="style5">Log-In</a></strong></span>
</div>
<?php
}
?></span>

按F12鍵檢查瀏覽器控制台。 當您單擊鏈接時,您將得到一些錯誤。

此錯誤應與displaylightbox()函數有關。

因此解決方案應該是:將主頁上包含的JS文件與其他頁面進行比較。 並將任務Js放在其他頁面上。

希望你能理解。 謝謝!!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM