Javascript
zylhuo
暂无
展开
-
javascript 对DirtionaryDropDownList的操作
var temp = document.getElementById("ddlPackageType"); temp.selectedIndex = 0;//设置默认的选项Indextemp.value="1";//设置默认选项的值 temp.options[0].selected=true;转载 2008-10-18 11:21:00 · 478 阅读 · 0 评论 -
javascript查找页面控件
html控件(input开对): document.getElementById("hidContractID");服务端控件:document.getElementById();原创 2009-01-06 10:31:00 · 1191 阅读 · 0 评论 -
常用javascript方法
//字符串去重复 function StrDistinct(swd) { Array.prototype.unique = function() { var a = {}; for (var i = 0; i if (typeof a[this[i]] == "undefine原创 2009-01-06 15:26:00 · 1165 阅读 · 0 评论 -
当前页刷新父窗口后再弹出问题的解决
document.domain = "XX.com"; function Save() { alert("已成功取消!"); var from = ""; if (from == "mc") { var refresh = window.opener.document原创 2009-01-12 17:34:00 · 763 阅读 · 0 评论 -
常用正则表达式
cs文件里:protected void jgvAttachedProduct_RowDataBound(object sender, GridViewRowEventArgs e) {TextBox jtxtQuantity = (TextBox)e.Row.FindControl("jtxtQuantity");jtxtQuantity.Attributes["onBlur"] = st转载 2008-12-22 15:51:00 · 380 阅读 · 0 评论 -
统计文本长度包含中文
var txt = document.getElementById("txtDeleteReason");num = txt.innerText.length--长度var arr = txt.innerText.match(/[^/x00-/x80]/ig)if (arr != null) num += arr.length原创 2010-03-31 17:24:00 · 614 阅读 · 0 评论