188js bbin接口----大世界的188js bbin接口------

拒绝访问 | www.anhui365.net | 百度云加速
请打开cookies.
此网站 (www.anhui365.net) 的管理员禁止了您的访问。原因是您的访问包含了非浏览器特征(5436a-ua98).
重新安装浏览器,或使用别的浏览器js---使用JS向页面动态添加radio - java - ITeye博客
博客分类:
开发过程中,需要使用JS向页面动态添加radio,实现时通过document.createElement()方法来实现,刚开始的代码如下:
1. var _radio = document.createElement("input");
2. _radio.type = "radio";
3. _radio.name = "_radio";
4. document.body.appendChild(_radio);
5. _radio = document.createElement("input");
6. _radio.type = "radio";
7. _radio.name = "_radio";
8. document.body.appendChild(_radio);
结果在IE浏览器上生成的raido无法选中,而使用firefox浏览器却可以选中。后来试了下面的代码:
1. var _radio = document.createElement("&input type='radio' name='_radio'&");
2. document.body.appendChild(_radio);
3. _radio = document.createElement("&input type='radio' name='_radio'&");
4. document.body.appendChild(_radio);
结果在IE上生成的radio可以选中了,但firefox浏览器中却无效。为此,对于不同的浏览器,需要使用不同的方式来生成radio,这个可以通过判断document是否具有uniqueID属性实现,因为uniqueID是IE特有的属性,为此可以通过下面代码来做到浏览器的兼容性:
# if(document.uniqueID) {
//IE浏览器分支
var _radio = document.createElement("&input type='radio' name='_radio'&");
document.body.appendChild(_radio);
_radio = document.createElement("&input type='radio' name='_radio'&");
document.body.appendChild(_radio);
# } else {
//非IE浏览器分支
var _radio = document.createElement("input");
_radio.type = "radio";
_radio.name = "_radio";
document.body.appendChild(_radio);
_radio = document.createElement("input");
_radio.type = "radio";
_radio.name = "_radio";
document.body.appendChild(_radio);
此外,在IE浏览中,通过document.createElement("input")来生成的radio和checkbox都无法通过document.getElementsByName()方法来获取。
浏览: 540212 次
来自: 深圳
/articl ...
------------------------- ...
大神,请问 string 类型 定义为 oracle的 cha ...
Line:103
f.doFilter(msg);
是否需要 ...}

我要回帖

更多关于 bbin官网 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信