用DOM增加radio input的奇怪问题

DOM?称是广泛的标准,但是我在?试用dom加入radio input的时候?到了麻烦。似乎ie和其他?览器对此的?解??。使用标准方法添加的radio的firefox下??以点击然??ie下?无法使用。查询了msdn以??现ie有自己的实现方法?

 

if(ie){
     inputPublic = document.createElement(“”);
     inputPrivate = document.createElement(“”);
    }
    else{
    inputPublic = document.createElement(“input”);
 inputPublic.type = “radio”;
 inputPublic.id = “public”;
 inputPublic.name = “ispublic”;
 inputPublic.value = “public”;

 inputPrivate = document.createElement(“input”);
 inputPrivate.type = “radio”;
 inputPrivate.id = “private”;
 inputPrivate.name = “ispublic”;
 inputPrivate.value = “private”; 
    }  

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s


%d 博主赞过: