jquery ajax date,javascript - Jquery Datepicker in AJAX page - Stack Overflow

戎桐
2023-12-01

I have 2 pages. 1 is the datepicker demo by jQuery and another is an AJAX page to load the datepicker demo page. When I access the datepicker page directly, the date selector is working fine as in the sample. But when I try to load it with an ajax call, the selector just seems not be working at all.

Here is the main.php page code

if (window.XMLHttpRequest) {

// code for IE7+, Firefox, Chrome, Opera, Safari

xmlhttp = new XMLHttpRequest();

}

else {

// code for IE6, IE5

xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");

}

xmlhttp.onreadystatechange = function() {

if (xmlhttp.readyState==4 && xmlhttp.status==200) {

document.getElementById("myDiv").innerHTML=xmlhttp.responseText;

}

}

xmlhttp.open("GET","development-bundle/demos/datepicker/default.html",true);

xmlhttp.send();

}

Let AJAX change this text

Change Content

 类似资料: