
javascript
请叫我哥
哥悄悄滴疯了
展开
-
解决ScriptManager.RegisterStartupScript注册只执行一次
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "click", "window.alert(0);", true); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "click", "window.alert(1);", tr原创 2011-06-09 10:32:00 · 4427 阅读 · 0 评论 -
在页面注册脚本,window.open使弹出的页面显示到屏幕中间
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "click", "var left=Math.round((window.screen.width-700)/2);var top=Math.round((window.screen.height-500)/2);window.open(bx_e原创 2011-06-17 16:55:00 · 2398 阅读 · 0 评论 -
向页面注册一过脚本,显示提示,关闭页面,刷新后面的页面(后面的页是window.open出来滴当前页)
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "click", "alert('确认成功!');window.close();window.opener.location='BxList_q.aspx原创 2011-08-09 17:35:28 · 808 阅读 · 1 评论 -
js动态创建fileupload控件,js判断上传文件的大小,超过指定的大小删除掉
在做批量上传时,使用的是js动态创建fileupload控件,在创建出来的控件里上传文件时,判断长传的大小,超出时,进行提示并清空当前的fileupload一、单个上传文件时的Js判断大小验证var templength=0;//保存所有的长度的变量 var flength=10240; //设置上传的文件最大值(单位:kb),超过此值则不上传。 function getFi原创 2011-11-28 18:16:58 · 8834 阅读 · 0 评论 -
文本框加灰色提示
name="TextBox1"onFocus="if(value==defaultValue){value='';this.style.color='#000'}" onBlur="if(!value){value=defaultValue;this.style.color='#999'}" style="color: #999999" value="请输入关键词"原创 2012-01-13 14:42:31 · 937 阅读 · 1 评论 -
背景图片平铺在页面上
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml">无标题文档div#div1 { position:fixed; top:0; left:0; bottom:0; right:0; z-index:-1;}div#div原创 2013-03-28 13:27:31 · 820 阅读 · 1 评论