FileUpload选取文件后想执行一段事件 主要是为了显示本地图片咱整啊,兄弟们 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 启用AutoPostback,其实还是在服务器端处理或者就用客户端脚本,难度比较高 是不是这种:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><script language="javascript">function showImg(e){ var image=new Image(); image.src=e.value; document.getElementById("s").style.display = ""; document.getElementById("s").src = e.value;}</script></head><body><form id="form1" name="form1" enctype="multipart/form-data" method="post" action=""> <img id="s" style="display:none" /> <input type="file" name="file" onchange="showImg(this);" /></form></body></html> <INPUT id="file" onpropertychange="preview.src=this.value;" type="file" name="file" runat="server"><IMG id="preview" height="75" src="images/nopic.gif" width="100" runat="server">即可及时显示图片 asp.net web应用程序打包 div 一个URL的问题 关于检索本地数据库最新信息显示在前台的关于c#代码 字符串截取 使用类遇到的问题 visual 2005 "当前上下文中不存在名称"的问题,各位大虾帮帮忙吧! 不同的页面,页面上的控件的后台代码却是同一个CS文件 运行任何一个webform都出错,,头疼啊。。。。 请问各位大侠,有没有针对域名的流量统计系统? 怎么实现图片批量上传 自定义控件保存属性
或者就用客户端脚本,难度比较高
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function showImg(e)
{
var image=new Image();
image.src=e.value;
document.getElementById("s").style.display = "";
document.getElementById("s").src = e.value;}
</script>
</head><body>
<form id="form1" name="form1" enctype="multipart/form-data" method="post" action="">
<img id="s" style="display:none" />
<input type="file" name="file" onchange="showImg(this);" />
</form>
</body>
</html>
即可及时显示图片