したがって、これらのスクリプトは機能したくありません。何をすべきかわからない。ページ B を単独で実行すると、すべて正常に動作します。ページ A がページ B に対して ajax 呼び出しを行った場合、そこにあるスクリプトはどれも機能しません。私は何をしますか?前もって感謝します。
ページ B のコード:
chkBox = function() {
jQuery("#docheckchildren").checkboxTree({
collapsedarrow: "../img/img-arrow-collapsed.gif",
expandedarrow: "../img/img-arrow-expanded.gif",
blankarrow: "../img/img-arrow-blank.gif",
checkchildren: true,
checkparents: false
});
}
ページ ajax 呼び出し:
$.ajax({
type: "GET",
url:"mypage.cfm",
data:formData,
cache:false,
success: function(res) {
$('#dsp_Grid').html(res);
chkBox();
}
, error: function(xmlHttpRequest, status, err) {
confirm('Error! ' + status +':'+ err);
}
});
ページ B: 単独で実行する必要がある場合は、次を追加する必要があります。
(同じ、ページAでsrcが違う)
問題の一部は、pageB から pageA の div に返されるものをすべてロードしていることだと思います。
$('#dsp_Grid').html(res)