开发者

Replace an entire html tag with another one using Jquery?

I have:

<input id="ONE" type="..." ...>

I want to replace this with:

<select id="TWO">开发者_JAVA技巧;
  <option value="1">1</option>
  <option value="2">2</option>
  <option value="3">3</option>
<select>

How do I do that?


Use

$("#ONE").replaceAll("#TWO") 

like described here. You can use replaceWith(content) if you want to specify replacing content in JS.


Maybe using replaceWith()

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜