摘要:
选择器过滤(选择客户后联动项目)function AddCustomerView() { var viewId = "{229782D0-1101-48E1-B414-ECB181F97C52}";var entityname="xz_project";var viewDisplayname="项目... 阅读全文
posted @ 2014-01-16 16:24
Bill 李
阅读(362)
评论(0)
推荐(0)
摘要:
根据选择类型隐藏或显示tab.function association(){ var attribute= Xrm.Page.getAttribute("xd_type"); var value= attribute.getValue(); if(value==0){ hidetab("tab_5"... 阅读全文
posted @ 2014-01-16 16:22
Bill 李
阅读(241)
评论(0)
推荐(0)
摘要:
选择lookup后自动带出其中的某个字段大小(注意 此字段必须在视图中有显示)//获取size 值function getField(){ var field =Xrm.Page.getAttribute("field");//lookup字段 var fieldSize; if(field==null){ return 0 ; }else{ var fieldValue=field.getValue(); if(fieldValue !=null){ fieldSize = fieldValue[0].keyValues.size.value;//lookup里面的大小字 阅读全文
posted @ 2014-01-16 16:18
Bill 李
阅读(432)
评论(0)
推荐(0)
摘要:
1 获取文本中的值 2 3 var name=Xrm.Page.getAttribute("xd_name").getValue(); 4 5 获取lookup选择的文本 6 7 var company=Xrm.Page.getAttribute("xd_company").getValue(); 8 9 var name=company[0].name10 11 12 给字段赋值13 Xrm.Page.getAttribute("xd_name").setValue(name);14 15 获取下拉框的文本/值16 var name 阅读全文
posted @ 2014-01-16 16:16
Bill 李
阅读(302)
评论(0)
推荐(0)
摘要:
function s4() {return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); }var guid= s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); 阅读全文
posted @ 2014-01-16 16:14
Bill 李
阅读(226)
评论(0)
推荐(0)
摘要:
var resultHelp = new RESTHelper(); var result = resultHelp .Read(uid); if (result.results.length <= 0) { return; } var id=result.results[0].Id; function RESTHelper() { } RESTHelper.prototype.Read = function (id) { var req = new XMLHttpRequest(); var baseurl = "/" + Xrm.Page.context.getO 阅读全文
posted @ 2014-01-16 16:13
Bill 李
阅读(350)
评论(0)
推荐(0)
摘要:
CheckCode.aspx 是你的验证码页面 阅读全文
posted @ 2014-01-16 16:08
Bill 李
阅读(368)
评论(0)
推荐(0)
摘要:
js验证邮箱 var temp = document.getElementById("email"); //对电子邮件的验证 var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; if (!myreg.test(temp.value)) { $("#intererrmsg").show(); $("#intermsg").html("请输入正确的用户名!" 阅读全文
posted @ 2014-01-16 16:06
Bill 李
阅读(4032)
评论(0)
推荐(0)
摘要:
禁止粘贴 onpaste="return false" 禁止鼠标右键 oncontextmenu = "return false"只能输入中文、英文、数字、@符号和.符号 onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5\@\.]/g,'')"只能输入数字: onkeyup="value=value.replace(/[^/d]/g,'') "只能输入汉字:onkeyup="value=value.repl 阅读全文
posted @ 2014-01-16 16:03
Bill 李
阅读(323)
评论(0)
推荐(0)
摘要:
获取当前页面完整地址:var url = window.top.document.URL;获取当前页面名称:var pagename=window.location.pathname 阅读全文
posted @ 2014-01-16 15:59
Bill 李
阅读(1668)
评论(0)
推荐(0)

浙公网安备 33010602011771号