你这个控件只有visual studio中带了由。
解决方案 »
- 请问这个extJS为什么function就是不能触发
- js判断页面高度,如果窗口超过800PX则出现某div,高手请指教!
- js如何实现页面的自动倒计时跳转呢???
- reload和refresh的联系与区别
- 用<input name="" type="image" onClick="window.open 。。。>打开网页的问题
- 高高高手看一下~~~
- javascript 把 txt 另存
- 求一个可以控制的树。
- 为什么在我的浏览器里Open()不管用?
- 一个javascript动态添加页面的问题
- JS打开新页问题<select name="select" onChange="document.location.href=this.value">这个只能在本页打开
- 关于滚动条
<br><input type='text' name='file2' id='file2'>
<input type=button name='brower' id='brower' style="width:83;height:24" value="浏览" onclick='document.all.file1.click(); document.all.file2.value=document.all.file1.value'>
<input type="file" id="upfile" style="width=200px;">
<span style="position:relative;left:-80px;width=80;">
<input type=button onclick="upfile.click();" value=样式随你设>
</span>
<span style="position:relative;left:-80px;">
<input type="submit" value="上传">
</span>
</form>
------------------
试试我的方法~~~~~~~~~~~
----------------------------
但是以孟子E章和我是大猫猫的方法,当在表单里有submit时,需要点击两下才能提交(先单击一下,鼠标从按钮移出,再单击一下才能提交),这是为什么?有方法解决吗?
function UpLoadForm_Validator(pUpLoadForm)
{
if(document.all.UpLoadFile.value=="")
{
window.confirm("请选择上传的文档!");
pUpLoadForm.UpLoadFile.focus();
return false;
}
var strFileFormat=pUpLoadForm.UpLoadFile.value.match(/^(.*)(\.)(.{1,8})$/)[3];//检查上传文件格式
strFileFormat=strFileFormat.toUpperCase();
if(strFileFormat=="DOC"||strFileFormat=="DOT")
{
}
else
{
window.confirm("只能上传.Doc和.Dot,请重新选择!");
return false;
}
return true;
}</script>
<form method="POST" enctype="multipart/form-data" action="" onsubmit="return UpLoadForm_Validator(this)" laguage="JavaScript" name="UpLoadForm">
<input type="file" name="UpLoadFile" id="UpLoadFile" style="visibility:hidden;">
<input type=button onclick="UpLoadFile.click();" style="background-color:#336699">
<input type="submit" value="上传" name="UpLoadButton">
</form>
<input type=button onclick="UpLoadFile.click();">可以的
你在点第一次 的时候自动触发第二次提交不久可以了
用
formname.submit()
<form enctype="multipart/form-data">
<input type="file" id="upfile" style="width=200px;">
<span style="position:relative;left:-80px;width=80;">
<input type=button onclick="upfile.click();" value=样式随你设>
</span>
<span style="position:relative;left:-80px;">
<input type="submit" value="上传">
</span>
</form>