index.php page
echo"<div id='div_com'></div>";
<script>
$(document).ready(function(){
var time= setInterval(function(){
$("#div_com").load('showingthis.php')
},1000);
)};
</script>
showingthis.php
echo " <div id='divtextarea'><button id='reply_reply'type='button'>Reply</button></div>";
如何在调用ajax load();
之后禁用此按钮答案 0 :(得分:0)
load()
有一个完整的回调参数
var time= setInterval(function(){
$("#div_com").load('showingthis.php', function(){
// new html has loaded
$('#reply_reply').prop('disabled', true);
});
},1000);