jQuery serialize with Ajax does not work in IE9
function myTimestamp(){
tstmp = new Date();
return tstmp.getTime();
}
function showValues() {
var str = ($("#this").serialize());
$("#results").text(str);
}
$(":checkbox, :radio").click(showValues);
$("select").change(showValues);
showValues();
function sendValues() {
var str = $("#this").serialize();
var response = $('input[name=product[]]:checked').val();
$.ajax({
url: "/post.php?avoidcache=' + myTimestamp();",
data: {str}
cache: false
});
}
This script works wonderful in Google Chrome; however when using in IE it only will execute one of the selected elements: the rest of开发者_开发百科 the selected elements get cut off. Any suggestions?
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
精彩评论