确实,会出现这种问题.
可以用的的方法<body>
<script>
rad = document.createElement("<input name='bao' type='radio' value='1'>");
document.body.appendChild(rad)
</script>这里有关于setAttribute的相关讨论.
http://expert.csdn.net/Expert/topic/3017/3017243.xml?temp=.4144098
可以用的的方法<body>
<script>
rad = document.createElement("<input name='bao' type='radio' value='1'>");
document.body.appendChild(rad)
</script>这里有关于setAttribute的相关讨论.
http://expert.csdn.net/Expert/topic/3017/3017243.xml?temp=.4144098
<script>
rad = document.createElement("<input name='bao' type='radio' value='1' checked>");
document.body.appendChild(rad)
//去取CHECKED属性
rad.outerHTML=rad.outerHTML.replace(/CHECKED/,"")
</script>