Apq.aspx
渐渐公布一些自写框架(暂命名为Apq,个人认为本框架最大优势是“不强制在内置类型的protorype内添加方法来扩展功能”,因此它支持与任意别的框架随意结合使用)的代码,本框架使用“伪名称空间/伪类”的方式按需获取JS。
由于有注释,所以不打算作太多说明,甚至不加说明。
首先是Apq.aspx
该页面主要功能是作为框架顶层window,但是它是可选的。并不一定需要它。
随后的见:
Config
 <!-- Apq$main-->
<!-- Apq$main-->
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 <script type="text/jscript">
<script type="text/jscript">
 window.Apq$main = true;    // 申明为主框架页
window.Apq$main = true;    // 申明为主框架页
 </script>
</script>

 <script src="Script/_Config.js" type="text/jscript"></script>
<script src="Script/_Config.js" type="text/jscript"></script>

 <script type="text/jscript">
<script type="text/jscript">
 /// 更新标题
/// 更新标题
 function title_update()
function title_update()
 {
{
 try
    try
 {
    {
 var main = document.getElementById( "main" );
        var main = document.getElementById( "main" );
 // 这里不能是以下语句
        // 这里不能是以下语句
 //        document.title = main.document.title;
//        document.title = main.document.title;
 setTimeout( "document.title = main.document.title", 0 );
        setTimeout( "document.title = main.document.title", 0 );
 }catch(e){}
    }catch(e){}
 }
}

 function window_onload()
function window_onload()
 {
{
 // 取消本处理
    // 取消本处理
 window.detachEvent("onload",window_onload);
    window.detachEvent("onload",window_onload);
 
    
 Apq_Init();
    Apq_Init();
 
    
 var main = document.getElementById( "main" );
    var main = document.getElementById( "main" );
 main.style.posHeight = document.body.offsetHeight - 24;
    main.style.posHeight = document.body.offsetHeight - 24;
 main.attachEvent("onload",title_update);
    main.attachEvent("onload",title_update);
 main.attachEvent("onresize",main_onresize);
    main.attachEvent("onresize",main_onresize);
 
    
 // 打开起始页面
    // 打开起始页面
 main.src = Apq$Config.Home;
    main.src = Apq$Config.Home;
 }
}

 window.attachEvent("onload",window_onload);
window.attachEvent("onload",window_onload);

 function main_onresize()
function main_onresize()
 {
{
 var main = document.getElementById( "main" );
    var main = document.getElementById( "main" );
 main.style.posHeight = document.body.offsetHeight - 24;
    main.style.posHeight = document.body.offsetHeight - 24;
 }
}
 </script>
</script>

 <html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
<head>
 <title></title>
    <title></title>
 </head>
</head>
 <body style="margin: 0" scroll="no">
<body style="margin: 0" scroll="no">
 <form id="form1" runat="server">
    <form id="form1" runat="server">
 <iframe id="main" width="100%" frameborder="no"></iframe>
        <iframe id="main" width="100%" frameborder="no"></iframe>
 </form>
    </form>
 </body>
</body>
 </html>
</html>
 
由于有注释,所以不打算作太多说明,甚至不加说明。
首先是Apq.aspx
该页面主要功能是作为框架顶层window,但是它是可选的。并不一定需要它。
随后的见:
Config
 <!-- Apq$main-->
<!-- Apq$main--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <script type="text/jscript">
<script type="text/jscript"> window.Apq$main = true;    // 申明为主框架页
window.Apq$main = true;    // 申明为主框架页 </script>
</script>
 <script src="Script/_Config.js" type="text/jscript"></script>
<script src="Script/_Config.js" type="text/jscript"></script>
 <script type="text/jscript">
<script type="text/jscript"> /// 更新标题
/// 更新标题 function title_update()
function title_update() {
{ try
    try {
    { var main = document.getElementById( "main" );
        var main = document.getElementById( "main" ); // 这里不能是以下语句
        // 这里不能是以下语句 //        document.title = main.document.title;
//        document.title = main.document.title; setTimeout( "document.title = main.document.title", 0 );
        setTimeout( "document.title = main.document.title", 0 ); }catch(e){}
    }catch(e){} }
}
 function window_onload()
function window_onload() {
{ // 取消本处理
    // 取消本处理 window.detachEvent("onload",window_onload);
    window.detachEvent("onload",window_onload); 
     Apq_Init();
    Apq_Init(); 
     var main = document.getElementById( "main" );
    var main = document.getElementById( "main" ); main.style.posHeight = document.body.offsetHeight - 24;
    main.style.posHeight = document.body.offsetHeight - 24; main.attachEvent("onload",title_update);
    main.attachEvent("onload",title_update); main.attachEvent("onresize",main_onresize);
    main.attachEvent("onresize",main_onresize); 
     // 打开起始页面
    // 打开起始页面 main.src = Apq$Config.Home;
    main.src = Apq$Config.Home; }
}
 window.attachEvent("onload",window_onload);
window.attachEvent("onload",window_onload);
 function main_onresize()
function main_onresize() {
{ var main = document.getElementById( "main" );
    var main = document.getElementById( "main" ); main.style.posHeight = document.body.offsetHeight - 24;
    main.style.posHeight = document.body.offsetHeight - 24; }
} </script>
</script>
 <html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<head> <title></title>
    <title></title> </head>
</head> <body style="margin: 0" scroll="no">
<body style="margin: 0" scroll="no"> <form id="form1" runat="server">
    <form id="form1" runat="server"> <iframe id="main" width="100%" frameborder="no"></iframe>
        <iframe id="main" width="100%" frameborder="no"></iframe> </form>
    </form> </body>
</body> </html>
</html>
 
                    
                     
                    
                 
                    
                


 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号