Php Ie中的jQueryAjax只运行一次
我的代码我已设置缓存:假仍然在IE中,它只运行一次。请帮帮我Php Ie中的jQueryAjax只运行一次,php,javascript,jquery,ajax,Php,Javascript,Jquery,Ajax,我的代码我已设置缓存:假仍然在IE中,它只运行一次。请帮帮我 <script type="text/javascript" src="javascripts/jq1.7.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#butn").click(function(){ var txt1 = $("#txt1").val();
<script type="text/javascript" src="javascripts/jq1.7.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#butn").click(function(){
var txt1 = $("#txt1").val();
$.ajax({
type: "Post",
url: "jqueryphp.php",
dataType: "html",
data: "txt1="+txt1,
cache: false,
success: function(result) {
$("div").html(result);
}
});
});
});
</script>
</head>
<body>
<form>
<input type="text" id="txt1" /><br />
<input type="button" id="butn">
</form>
$(文档).ready(函数(){
$(“#butn”)。单击(函数(){
var txt1=$(“#txt1”).val();
$.ajax({
类型:“Post”,
url:“jqueryhp.php”,
数据类型:“html”,
数据:“txt1=“+txt1,
cache:false,
成功:功能(结果){
$(“div”).html(结果);
}
});
});
});
请帮帮我,我被困在这里了。它在每个浏览器上都能正常运行,IE除外。考虑为每个URL添加时间戳。这里还有一些其他的选择。 尝试以下方法:
$.ajaxSetup({
cache: "false"
});
$.ajax({
type: "POST",
url: "jqueryphp.php",
data: "txt1="+txt1,
cache: false,
success: function(result){
$("div").html(result);
}
});
希望它有助于确保调用的文件具有正确的doctype和xmlns声明 为调用中涉及的元素分配xmlns id 例如: 也可以使用:jQuery.post('call.php',{action:'get'}
在这里找到完整的教程:到底发生了什么?什么都没有?事件是否被调用?这是:$(“#butn”)。单击(函数(){…工作…我的意思是尝试提醒(txt1);…检查是否每次都调用该单击