|
发表于 2010-12-1 13:49:36
|
显示全部楼层
里面函数太多了1- function WebForm_DoPostBackWithOptions(options) {
- var validationResult = true;
- if (options.validation) {
- if (typeof(Page_ClientValidate) == 'function') {
- validationResult = Page_ClientValidate(options.validationGroup);//ture
- }
- }
- if (validationResult) {
- if ((typeof(options.actionUrl) != "undefined") && (options.actionUrl != null) && (options.actionUrl.length > 0)) {
- theForm.action = options.actionUrl;
- }
- if (options.trackFocus) {
- var lastFocus = theForm.elements["__LASTFOCUS"];
- if ((typeof(lastFocus) != "undefined") && (lastFocus != null)) {
- if (typeof(document.activeElement) == "undefined") {
- lastFocus.value = options.eventTarget;
- }
- else {
- var active = document.activeElement;
- if ((typeof(active) != "undefined") && (active != null)) {
- if ((typeof(active.id) != "undefined") && (active.id != null) && (active.id.length > 0)) {
- lastFocus.value = active.id;
- }
- else if (typeof(active.name) != "undefined") {
- lastFocus.value = active.name;
- }
- }
- }
- }
- }
- }
- if (options.clientSubmit) {
- __doPostBack(options.eventTarget, options.eventArgument);
- }
- }
复制代码 2- function WebForm_PostBackOptions(eventTarget, eventArgument, validation, validationGroup, actionUrl, trackFocus, clientSubmit) {
- this.eventTarget = eventTarget;
- this.eventArgument = eventArgument;
- this.validation = validation;
- this.validationGroup = validationGroup;
- this.actionUrl = actionUrl;
- this.trackFocus = trackFocus;
- this.clientSubmit = clientSubmit;
- }
复制代码 主要这2个,里面用了很多的其他函数镇是麻烦,主要的函数在- http://www.jjoobb.cn/WebResource.axd?d=hMRzz4ub1UkzZ9JgFCPiGQ2&t=633650267383038812
复制代码 和- http://www.jjoobb.cn/WebResource.axd?d=Y5UC6aIxvRVyb-DZw3HmZU-yhy7nmZ8sBZrQ0U3BWIg1&t=633650267383038812
复制代码 里可以找到,设置一圈,到最后也只是把- <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
- <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
复制代码 设置了而已,和- function __doPostBack(eventTarget, eventArgument) {
- if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
- theForm.__EVENTTARGET.value = eventTarget;
- theForm.__EVENTARGUMENT.value = eventArgument;
- theForm.submit();
- }
- }
复制代码 效果一样
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?加入会员
x
|