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