随笔分类 -  ECMAScript

ECMAScript 学习采集
摘要:1,页面上有个_spPageContextInfo对象,可以获取一些我们需要的东西。(1)获取当前用户Id1varuserId=_spPageContextInfo.userId;(2)获取当前用户的登录名1varuserLoginName=_spPageContextInfo.userLoginName;(3)获取网站的相对路径1varsiteUrl=_spPageContextInfo.webServerRelativeUrl;通过该对象还可以获得好多东西,通过开发人员工具,在页面上找到该对象可以点出各种属性来。2,除了上面的简单的获取当前用户Id,用户名的方式外,还有一种方法。12345 阅读全文
posted @ 2014-03-12 10:04 Star★ 阅读(1663) 评论(0) 推荐(0)
摘要:using System;using System.Text;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Collections;using Microsoft.SharePoint;namespace updateInfo{ public partial class oEdit : System.Web.UI.UserControl { priva... 阅读全文
posted @ 2013-01-09 15:30 Star★ 阅读(320) 评论(0) 推荐(0)
摘要:前台:<%@ Register TagPrefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> $("#<%=ddl_type.ClientID %>").change(function () { if ($(this).va 阅读全文
posted @ 2013-01-09 14:50 Star★ 阅读(257) 评论(0) 推荐(0)
摘要:var collListItem = null;function IsExsiteData() { collListItem = null; var peoplePickerData1 = getPeoplePickerDataDocument(); var userId1 = getXmlValue(peoplePickerData1, "/ArrayOfDictionaryEntry/DictionaryEntry[./Key = 'SPUserID']/Value"); var ActivityID1=$("#td_IDInfo") 阅读全文
posted @ 2013-01-09 14:35 Star★ 阅读(208) 评论(0) 推荐(0)
摘要:function EntryVoteData() { if(VerificationData()==true){ var Name=$("div[id$='_txt_Name_upLevelDiv']").text(); var peoplePickerData = getPeoplePickerDataDocument(); var userId = getXmlValue(peoplePickerData, "/ArrayOfDictionaryEntry/DictionaryEntry[./Key = 'SPUserID']/ 阅读全文
posted @ 2013-01-09 14:33 Star★ 阅读(275) 评论(0) 推荐(0)
摘要:<script type="text/javascript"> function getXmlValue(xmlDocument, xpath) { var results = null; if (xmlDocument.evaluate) { results = xmlDocument.evaluate("/ArrayOfDictionaryEntry/DictionaryEntry[./Key = 'SPUserID']/Value", xmlDocument, null, XPathResult.UNORDERED_NO 阅读全文
posted @ 2013-01-09 14:30 Star★ 阅读(252) 评论(0) 推荐(0)