html表单上传文件的“浏览”按钮修改方法

建站知识 2021-07-02 22:41www.168986.cn长沙网站建设

复制代码
代码如下:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="PSPad editor, .pspad.">
<title></title>
</head>
<body> <style>
input{border:1px solid #000;}
.clear{clear:both;}
.ehdel_upload_show input{float:left; margin-:10px;}
.ehdel_upload{float:left;margin-:-20px; margin-:-40px; filter:alpha(opacity=0);-moz-opacity:0;opacity:0;}
</style> <form method="post" action="" enctype="multipart/form-data">
<div class="ehdel_upload_show">
<input id="ehdel_upload_text" type="text" name="txt" />
<input id="ehdel_upload_btn" type="image" src="http://.isclassic./wp-content/uploads/2010/07/link_popup.gif" value="请选择文件" />
</div>
<div class="clear"></div>
<input type="file" onchange="ehdel_upload_text.value=this.value" class="ehdel_upload" />
</form>
</body>
</html>

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by