[英]jQuery works in Internet Explorer but not in Chrome and Firefox
I have written the following very simple jQuery post. 我写了以下非常简单的jQuery帖子。 It works in Internet Explorer but not in either Chrome or Firefox: 它适用于Internet Explorer,但不适用于Chrome或Firefox:
<script>
function showphone(){
$.post('phonedata.php',{
k: document.getElementById('k').value,
s: document.getElementById('s').value
},
function(output){
$('#showphone').html(output);
});
}
showphone();
</script>
Is there anything that I can do for Chrome and Firefox? 我可以为Chrome和Firefox做任何事情吗?
Try 尝试
$(document).ready(function(e) {
showphone();
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.