$.get not working in IE

落花浮王杯 提交于 2019-12-31 04:18:11

问题


This displays 1 no matter what I echo in getbillno.php - also why I'm not showing that part anymore. Nothing would change unless I change bill into a string or put tbl (just to see what happens) in its place, so I figured the problem is not in getbillno.php but with this part right here. I'm very much new to jQuery and I really can't see what's wrong with this.

This works perfectly with Chrome, FF, and in Safari. I have other functions with jQuery in the same page and those work fine in any browser including IE(9). It's just with this one that I'm having problems.

<script type="text/javascript">
function getbillno(tbl){

$.get("getbillno.php?tbl="+ tbl, function(bill){
$("#billno").val(bill); });
}   
</script>

I'm trying to make this work with IE(9) because it's the only browser that lets me have the Print options I want.


回答1:


Instead of hitting refresh, I tried closing IE(9) and it did display the right value. I changed the value in my code again then refreshed IE, it would display the one before that - it's the value after I reopened IE.

One line SOLVED my problems:

See it here: IE must close for event with jQuery to work



来源:https://stackoverflow.com/questions/7633511/get-not-working-in-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!