HTML中上传文件的表单(file有一个编辑框和一个浏览的按钮),客户只想要一个按钮,要求把编辑框去掉
我修改后发现没法上传文件了,路径是对的,请大家帮忙指点下,下面是所有的代码<html><head><metaHTTP-EQUIV='Pragma'CONTENT='no-...
我修改后发现没法上传文件了,路径是对的,请大家帮忙指点下,下面是所有的代码
<html>
<head>
<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
<link rel="stylesheet" href='stylemain.css' type='text/css'>
<link rel="stylesheet" href='colors.css' type='text/css'>
<script language="javascript">
<!-- hide
var progress = 0;
function isInProgress() {
if ( progress == 0 ) {
progress = 1;
return true;
}
alert('Upload software is in progress. Please wait for a minute.');
return false;
}
function checkFileName(txtBox)
{
if (txtBox.length == 0)
{
alert("No filename selected,please assign one file to update.");
return false;
}
}
// done hiding -->
</script>
</head>
<body>
<blockquote>
<form method='post' ENCTYPE='multipart/form-data' action='upload.cgi' onSubmit='return isInProgress();'>
<b>Tools -- Update Software</b><br>
<br>
<b>Step 1:</b> You can download the latest firmware from the link below:<br>
http://www.digicom.it/italiano/supporto/upgrade.html<br>
<br>
<b>Step 2:</b> Enter the path to the image file location in the box below or
click the "Browse" button to locate the image file.<br>
<br>
<b>Step 3:</b> Click the "Update Software" button once to upload the new image
file.<br>
<br>
NOTE: The update process takes about 2 minutes to complete, and your DSL Router
will reboot.<br>
<br>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>Software File Name:
</td>
<td><input type='file' name='filename' style="display:none"></td>
<td><input type="button" value="Scegli Documento" onClick='filename.click();'></td>
<td>nessun...lonato </td>
</tr>
</table>
<p align="center"><input type='submit' value='Update Software' onclick='return checkFileName(document.forms[0].filename.value);'></p>
</form>
</blockquote>
</body>
</html> 展开
<html>
<head>
<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
<link rel="stylesheet" href='stylemain.css' type='text/css'>
<link rel="stylesheet" href='colors.css' type='text/css'>
<script language="javascript">
<!-- hide
var progress = 0;
function isInProgress() {
if ( progress == 0 ) {
progress = 1;
return true;
}
alert('Upload software is in progress. Please wait for a minute.');
return false;
}
function checkFileName(txtBox)
{
if (txtBox.length == 0)
{
alert("No filename selected,please assign one file to update.");
return false;
}
}
// done hiding -->
</script>
</head>
<body>
<blockquote>
<form method='post' ENCTYPE='multipart/form-data' action='upload.cgi' onSubmit='return isInProgress();'>
<b>Tools -- Update Software</b><br>
<br>
<b>Step 1:</b> You can download the latest firmware from the link below:<br>
http://www.digicom.it/italiano/supporto/upgrade.html<br>
<br>
<b>Step 2:</b> Enter the path to the image file location in the box below or
click the "Browse" button to locate the image file.<br>
<br>
<b>Step 3:</b> Click the "Update Software" button once to upload the new image
file.<br>
<br>
NOTE: The update process takes about 2 minutes to complete, and your DSL Router
will reboot.<br>
<br>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>Software File Name:
</td>
<td><input type='file' name='filename' style="display:none"></td>
<td><input type="button" value="Scegli Documento" onClick='filename.click();'></td>
<td>nessun...lonato </td>
</tr>
</table>
<p align="center"><input type='submit' value='Update Software' onclick='return checkFileName(document.forms[0].filename.value);'></p>
</form>
</blockquote>
</body>
</html> 展开
2个回答
展开全部
如果那样的话,只能将 浏览器自带的file控件进行隐藏,使用其他开源的上传组件替代。
jquery上传插件 自己网上百度下,剩下的靠你自己了。
推荐=》 uploadify.
jquery上传插件 自己网上百度下,剩下的靠你自己了。
推荐=》 uploadify.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2011-03-19
展开全部
这里有一个无刷新多文件上传系统
里面可以判断文件多少 文件类型
里面有教程和源码
里面可以判断文件多少 文件类型
里面有教程和源码
参考资料: http://www.blueidea.com/common/shoutbox/redir.asp?3=n&id=11280
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询