$ .get在IE中不起作用 [英] $.get not working in IE

查看:233
本文介绍了$ .get在IE中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论我在getbillno.php中回显什么,这都会显示1-也是为什么我不再显示该部分了. 除非我将帐单更改为字符串,否则什么都不会改变 或将tbl(只是为了看看会发生什么)放在它的位置,所以我认为问题不在于 在getbillno.php中,但此处有此部分.我很 jQuery的很多新功能,我真的看不到出什么问题了 与此.

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.

这与Chrome,FF和Safari完美配合.我在同一页面上还有其他使用jQuery的功能,这些功能在包括IE(9)在内的任何浏览器中都可以正常工作.正是与此有关,我遇到了问题.

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>

我正在尝试使它与IE(9)一起使用,因为它是唯一的浏览器 这让我有了所需的打印"选项.

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.

推荐答案

我没有关闭刷新,而是尝试关闭IE(9),它确实显示了正确的值.我再次更改了代码中的值,然后刷新了IE,它将显示之前的值-这是我重新打开IE后的值.

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.

一行解决了我的问题:

在这里查看: IE必须关闭以使用jQuery的事件才能正常工作

这篇关于$ .get在IE中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆