Html中的Java腳本如下。加載Javascript/jQuery不能在HTML中工作
$(document).ready(function() {
var found = {{.found}}
window.alert("hiiii");
if (foundRecords==true) {
document.getElementById("abc").style.display = "block";
}
return
});
這應該在HTML加載的時間得到加載。但它並沒有完全加載。在這個簡單的代碼和平中,我沒有發現任何錯誤。
什麼是'{{;實測值}}'?你在'console'中遇到錯誤嗎? – Tushar
另外,'foundRecords'不能爲真,因爲它沒有被定義。 –
在控制檯中沒有錯誤 –