var html = '<div><input type="text" id="my" value="2"/></div>'; $("body").append(html); 我在页面中通过js加入一个input 元素,然后再接下来的代码 ...