Asp.net源码专业站
首页->控件应用->漂亮实用的自定义对话框源码及Demo>>Com.EEShou.Www.TreeControl/obj/Release/Com.EEShou.Www.TreeControl.js.TreeControlsBackGround.js>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:漂亮实用的自定义对话框源码及Demo
普通视图
		            
1///////////////////////////////////////////////////////////////////// 2//// //// 3//// BackGround //// 4//// Namespace: TreeControls.js.BackGround.js //// 5//// CreateName: Tree //// 6//// Email: treeyh@126.com //// 7//// Version: 1.0 bate3 //// 8//// CreateDate: 2007-5-18 //// 9//// //// 10///////////////////////////////////////////////////////////////////// 11 12 13 14///////pageloadshowMsg 15window.onload = function () 16{ 17 iTree_DialogBox_pageHeight=TreeDocumentHeight(); 18 //iTree_DialogBox_pageHeight = document.documentElement.scrollHeight>iTree_DialogBox_pageHeight?document.documentElement.scrollHeight: iTree_DialogBox_pageHeight; 19 20 if(TreeDialogBox$('TreeOverlayBackgroundDiv')['style']['display']=="block") 21 { 22 var obackGround = TreeDialogBox$('TreeOverlayBackgroundDiv'); 23 obackGround.style.top="0px"; 24 TreeDialogBoxmiddle("TreeDialogBoxDiv"); 25 obackGround.style.height = iTree_DialogBox_pageHeight; 26 obackGround.style.width = TreeDocumentWidth(); 27 28 29 var oDialogBoxDiv = TreeDialogBox$("TreeDialogBoxDiv"); 30 if(oDialogBoxDiv) 31 { 32 iTree_DialogBox_MoveMaxHeight = iTree_DialogBox_pageHeight - parseInt(oDialogBoxDiv.offsetHeight); 33 34 var sClientWidth = document.documentElement.clientWidth; 35 var sWidth = document.body.clientWidth; 36 37 if(sClientWidth < sWidth) 38 { 39 iTree_DialogBox_scrollwidth = parseInt(document.documentElement.scrollWidth) - parseInt(document.body.clientWidth); 40 iTree_DialogBox_MoveMaxWidth = parseInt(sWidth) - iTree_DialogBox_scrollwidth - parseInt(oDialogBoxDiv.offsetWidth); 41 } 42 else if(sClientWidth == sWidth) 43 { 44 iTree_DialogBox_MoveMaxWidth = parseInt(document.documentElement.offsetWidth) - iTree_DialogBox_scrollwidth - parseInt(oDialogBoxDiv.offsetWidth); 45 } 46 } 47 //TreeDialogBoxmiddle("TreeDialogBoxDiv"); 48 } 49} 50 51 52/*windowSizeChange*/ 53window.onresize=function TreeDialogBoxSize() 54{ 55 if(TreeDialogBox$('TreeOverlayBackgroundDiv')['style']['display']=="block") 56 { 57 TreeDialogBox$('TreeOverlayBackgroundDiv').style.height = iTree_DialogBox_pageHeight; 58 59 var oTreeDialogBox = TreeDialogBox$("TreeDialogBoxDiv"); 60 if(oTreeDialogBox) 61 { 62 63 iTree_DialogBox_MoveMaxHeight = iTree_DialogBox_pageHeight - parseInt(oTreeDialogBox.offsetHeight); 64 65 TreeDialogBox$('TreeOverlayBackgroundDiv').style.width = TreeDocumentWidth(); 66 iTree_DialogBox_MoveMaxWidth = TreeDocumentWidth() - parseInt(oTreeDialogBox.offsetWidth); 67// var sClientWidth = document.documentElement.scrollWidth; 68// var sWidth = document.body.clientWidth; 69// 70// if(sWidth <= sClientWidth) 71// { 72// TreeDialogBox$('TreeOverlayBackgroundDiv').style.width = sClientWidth; 73// // alert("sClientWidth:" + sClientWidth); 74// iTree_DialogBox_MoveMaxWidth = sClientWidth - parseInt(oTreeDialogBox.offsetWidth); 75// } 76// else 77// { 78// TreeDialogBox$('TreeOverlayBackgroundDiv').style.width = sWidth-iTree_DialogBox_scrollwidth; 79// //alert("sWidth:" + sWidth); 80// iTree_DialogBox_MoveMaxWidth = sWidth-iTree_DialogBox_scrollwidth - parseInt(oTreeDialogBox.offsetWidth); 81// } 82 TreeDialogBoxmiddle('TreeDialogBoxDiv'); 83 } 84 } 85} 86 87function TreeControls_ShowBackGround() 88{ 89 var bgDivHeight = document.body.clientHeight; 90 bgDivHeight = document.documentElement.clientHeight>bgDivHeight?document.documentElement.clientHeight: bgDivHeight; 91 TreeDialogBox$('TreeOverlayBackgroundDiv').style.height = bgDivHeight; 92 93 var sClientWidth = document.documentElement.scrollWidth; 94 var sWidth = document.body.clientWidth; 95 if(sWidth < sClientWidth) 96 { 97 TreeDialogBox$('TreeOverlayBackgroundDiv').style.width = sClientWidth; 98 iTree_DialogBox_MoveMaxWidth = sClientWidth - 398; 99 } 100 else if(sWidth == sClientWidth) 101 { 102 TreeDialogBox$('TreeOverlayBackgroundDiv').style.width = sClientWidth; 103 iTree_DialogBox_scrollwidth = parseInt(document.documentElement.offsetWidth) - parseInt(document.body.clientWidth); 104 iTree_DialogBox_MoveMaxWidth = parseInt(document.documentElement.offsetWidth) - iTree_DialogBox_scrollwidth - 398; 105 } 106 else 107 { 108 TreeDialogBox$('TreeOverlayBackgroundDiv').style.width = sWidth; 109 iTree_DialogBox_MoveMaxWidth = parseInt(sWidth)- 398; 110 } 111}
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:漂亮实用的自定义对话框源码及Demo
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146