zoukankan
html css js c++ java
不刷新动态添加FileUpload
页面
<
tr
>
<
td
align
="right"
style
="height: 48px"
>
<
asp:Label
ID
="Label8"
runat
="server"
Text
="附 件:"
Width
="100%"
></
asp:Label
></
td
>
<
td
align
="left"
colspan
="3"
style
="height: 48px"
>
<
div
id
="MyFile"
style
="100%"
>
<
asp:FileUpload
ID
="FileUpload1"
runat
="server"
Width
="80%"
/>
</
div
>
<
input
id
="btn_AddFile"
type
="button"
runat
="server"
value
="添加附件"
/>
</
td
>
</
tr
>
.cs中
protected
void
Page_Load(
object
sender, EventArgs e)
...
{
//
注册添加文件脚本
this
.Page.ClientScript.RegisterStartupScript(
this
.GetType(),
"
MyScript
"
,
"
function addFile(btn)
"
+
"
{ var str = '<br><INPUT type="file" style="80%" NAME="File">';
"
+
"
document.getElementById('MyFile').insertAdjacentHTML("beforeEnd",str);
"
+
"
btn.value='继续添加附件'
"
+
"
}
"
,
true
);
btn_AddFile.Attributes.Add(
"
onClick
"
,
"
addFile(this)
"
);
}
查看全文
相关阅读:
Cocos2dx开发游戏移植到Android平台
cocos2dx创建sprite的多种方法
C++实现大数据乘法
使用detours实现劫持
使用C与C++混合编程封装UDP协议
C++实现大数据乘法
使用C与C++混合编程封装UDP协议
python字符串类型
python数字类型
python数据类型
原文地址:https://www.cnblogs.com/juan/p/1430701.html
最新文章
poj 1651 区间dp
hdu 2476 区间dp
hdu 2709 递推
hdu 1171 多重背包
hdu 1074 状压dp
hdu 3642 体积并
poj 1417 并查集+dp
2014年十大优秀免费空间排行-稳定,速度,可靠和专业的免费主机空间
域名解析 URL转发
CDN云主机与传统虚拟主机功能对比
热门文章
Coding.net代码托管空间申请与使用-安装并运行WordPress博客
GIT分支管理是一门艺术
关于vi不正常退出产生的swp文件
Git Push 避免用户名和密码方法
正则表达式简明参考
linux ssh-keygen
常用Git命令汇总
Cocos2dx实现象棋之布局
cocos2dx实现经典飞机大战
Linux开发cocos2dx程序环境搭建
Copyright © 2011-2022 走看看