<iframe name="ajaxifr" style="display:none;"></iframe>
<form name="upload" id="upload" method="post" enctype="multipart/form-data"
action="../../Handler/a.ashx" target="ajaxifr" >
<input type="file" id="fileupload" onpropertychange="document.forms[0].submit();" />
<input type="button" value="改变头像\" onclick="$('fileupload').click();" />
</form>单独点file可以触发submit, 但是想通过一个button触发file 的onclick事件,然后选中文件后触发 submit 就失败。
<form name="upload" id="upload" method="post" enctype="multipart/form-data"
action="../../Handler/a.ashx" target="ajaxifr" >
<input type="file" id="fileupload" onpropertychange="document.forms[0].submit();" />
<input type="button" value="改变头像\" onclick="$('fileupload').click();" />
</form>单独点file可以触发submit, 但是想通过一个button触发file 的onclick事件,然后选中文件后触发 submit 就失败。
解决方案 »
- background:transparent url(i/pageBd-hasAppbar.gif) repeat-y scroll -3000px 0;求人讲解一下.
- 如何让页面滚动到最后
- 100分 :小问题。
- 江湖救急!!reportviewer中的合并单元格问题
- access如果是空字段,读取就出错那该怎么办?
- 做了个网站,有ie8.firefox下显示都没问题,到ie6下全部错位,急急急。。。
- 各位大哥帮我看看这段代码(新人,多关照)!
- 高手指点,来者有分!上传我的项目到虚拟主机后,提示<customErrors> 错误!
- hello
- 应该怎么办??
- soap调用webservice
- 简单随机数算法请教
http://blog.csdn.net/foren_whb/article/details/6307828
<input type="button" value="改变头像\" onclick="$('fileupload').click();" />=》
<input type="file" id="fileupload" />
<input type="button" value="改变头像\" onclick="document.forms[0].submit();" />