How do you dynamically create a radio button in Javascript that works in all browsers?

后端 未结 11 1544
深忆病人
深忆病人 2020-12-01 12:12

Dynamically creating a radio button using eg

var radioInput = document.createElement(\'input\');
radioInput.setAttribute(\'type\', \'radio\');
radioInput.se         


        
11条回答
  •  情书的邮戳
    2020-12-01 12:59

    why not creating the input, set the style to dispaly: none and then change the display when necesary this way you can also probably handle users whitout js better.

提交回复
热议问题