$("#upload").replaceWith("<input type='file' id='upload' name='upload' style='position:relative; top:0px; left:-240px; width:346px; height:46px; opacity:0; filter: Alpha(Opacity=0); cursor:pointer; title=" + count + "' />")把这一句的写法换掉, 不用replaceWith. 通过$().css, $(),.attr()来进行赋值试试