對不起我的英語,我的另一個國籍未捕獲的ReferenceError:的WriteHTML沒有定義
我在JS代碼,但遺憾的是它並沒有因爲這個警告 如何修復它,使其工作工作,謝謝
你說得對,對不起,這裏是完整的代碼,我包括在亞歷克這個腳本3.1
這些受影響的文件
1) overall_footer_after.html
2) overall_header_page_body_before.html
3) scrollamp.js
1)在overall_footer_after.html和加載的scrollamp.js文件這樣
<!-- INCLUDEJS scrollamp.js -->
2)這是我把文件中的代碼:overall_header_page_body_before.html
<div class="forabg">
<div class="inner">
<ul class="topiclist">
<li class="header"><dl><dt>News</dt></dl></li>
</ul>
<div class="postbody" style="width: 100%">
<div class="post bg2">
<div class="avviso" style="padding: 0px; width: 400px; height: 200px; margin: 0 auto 0 auto;text-align:center; border: #00ffff 0px solid;">
<script type="text/javascript">
innerHTML()
</script>
</div>
</div>
</div>
</div>
</div>
3)這是我把文件中的代碼scrollamp.js
function innerHTML() {
document.write("<marquee width\"400\" height\"200\" direction=\"Up\" scrollamount=\"1\" scrolldelay=\"1\">");
document.write("<p style=\"font-size:25px;font-weight: bold;color:red;text-align:center;text-decoration:underline blink;\">.:| AVVISO IMPORTANTE |:.<\/p>");
// document.write("<br\/>");
document.write("<p style=\"font-size:15px;font-weight: bold;color:#000;text-align:center;\">Tutti gli Utenti Registrati, dovranno effettuare almeno 5 messaggi per visualizzare tutto il forum<\/p>");
document.write("<\/marquee>");
}
我們無法在任何地方看到您的.js文件。它具有調用的WriteHTML之前加載。你也可以使用innerHTML或者至少只有一個document.write – mplungjan
@mplungjan https://developer.mozilla.org/en-US/docs/Glossary/Histing目錄 – j08691
加載到另一個html文件,這樣<! - INCLUDEJS scrollamp.js - > –