使用javascript / ajax在firefox中列表框有问题 [英] Having trouble with list box in firefox using javascript/ajax

查看:47
本文介绍了使用javascript / ajax在firefox中列表框有问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我对网络编程比较陌生,而且我一直在把我的一个VB程序转移到一个web格式。我一般都使用谷歌浏览器,这就是我一直在测试我的网页。昨天我在我的网页应用程序中工作得很好,所以我决定看看它在IE中看起来像什么,之前它似乎是化妆品,但我注意到它没有像镀铬一样正常刷新。这不是什么大问题,但我想看看它在Firefox中是如何工作的,我注意到它不会为我填充一个列表框。这是下面的代码。基本上我使用ajax打开另一个运行一些SQL代码的页面然后吐出错误的日期列表以添加到名为lstDates的列表框中。

Hello i''m relatively new to web programming and i have been giving the task of moving one of my VB programs over to a web format. I generally use google chrome and that has been what i''ve been testing my web page in. Yesterday i got everything in my web application working great so i decided to check out what it looks like in IE, before it just seemed to be cosmetic, but i noticed it didn''t refresh properly like it did in chrome. it wasn''t a big deal but i wanted to see how it works in Firefox and i noticed that it won''t populate a list box for me. here is the code below. Basically i use ajax to open another page which runs some SQL code then spits bad a list of dates to add to a list box called lstDates.

展开 | 选择 | Wrap | 行号

推荐答案



Hi,

展开 | 选择 | < span class =codeLinkonclick =WordWrap(this);> Wrap | 行号


我不建议使用那种代码。如果您要使用功能/对象检测,请使用您计划使用的对象。在这里,因为两组浏览器(标准和非标准使用add方法)都行不通,所以请使用try / catch。


参见 http://bytes.com /topic/javascript/in...rk-expected-ie
I would not recommend using that kind of code. If you''re going to use feature/object detection, use the object that you''re planning on using. Here, that wouldn''t work because both sets of browsers (standard and non-standard use the add method), so use try/catch.

See http://bytes.com/topic/javascript/in...rk-expected-ie


请注意,ID名称不能以数字开头。
Please note that id names may not begin with a number.


这篇关于使用javascript / ajax在firefox中列表框有问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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