4
我從HTML文件附加HTML標籤到正文使用jQuery.After我加載html標籤我加載JS文件,做html上的東西tags.jQuery不適用於加載的html,但當我在頁面jQuery上靜態放置html標籤正確。
我使用此代碼將html標籤附加到主體
問題是什麼?
Its我的目標html標籤jquery不能在加載的html上工作
function DisplayLoginPanel() {
$('Body').load('Resources/HTMLContents/Login.htm');
LoadNewScript("Resources/OtherTools/js/slide.js");
}
function LoadNewScript(ScriptPath) {
$.getScript(ScriptPath, function() {
alert("Script loaded and executed.");
});
}
哇..你是對的謝謝你。你能解釋一下嗎? – Shahin 2011-06-05 16:53:41
@shaahin更新了我的答案與它的原因 – Niklas 2011-06-05 17:01:08