合成一个页面,那可以通过JS定义一个全局变量吧
var aa;

解决方案 »

  1.   

    框架左边是Menu,如下:
    <tr> <td valign="left" class="style2"> <a href="fanxingwu.asp?flag=1" target="Content">1 </a> </td> </tr>
    <tr> <td valign="left" class="style2"> <a href="fanxingwu.asp?flag=2" target="Content">2 </a> </td> </tr> main框架:
    fanxingwuMain.asp:
    <%
      flag=Request.QueryString("flag")
      if flag=1 then
       处理原1.html内容....................
      else
       处理原2.html内容....................
      end if
    %>
      

  2.   

    是不是这样:
    <tr> <td valign="left" class="style2"> <a href="1.html#1" target="Content">1 </a> </td> </tr> 
    <tr> <td valign="left" class="style2"> <a href="1.html#2" target="Content">2 </a> </td> </tr> 1.html中有个变量判断#后面的是1,还是2!
      

  3.   

    恩,是这样的,那么在1.html里如何检测到这个1 or 2.
      

  4.   

    谢谢,我用的是html和jsp,没用到asp。所以想知道jsp和html是如何做的。
      

  5.   

    <tr> <td valign="left" class="style2"> <a href="1.html?key=1" target="Content">1 </a> </td> </tr> 
    <tr> <td valign="left" class="style2"> <a href="1.html?key=2" target="Content">2 </a> </td> </tr>1.html里用 search 获取 ?后面的字符串
      

  6.   

    请详细写下语句,好吗?
    我想达到的效果是:点击menu_advanced.html里的链接附带一个值到1.html,我不知道语法如何写。
    1.html 里的temp能收到链接附带过来的值,然后我在1.html里就可以针对temp来操作。menu_advanced.html:<tr> <td valign="left" class="style2"><a href="1.html?value=1" target="Content">1</a></td></tr> 
    <tr> <td valign="left" class="style2"><a href="2.html?value=2" target="Content">2</a></td></tr>  
    or
    <tr> <td valign="left" class="style2"><a href="1.html?#1" target="Content">1</a></td></tr> 
    <tr> <td valign="left" class="style2"><a href="2.html?#2" target="Content">2</a></td></tr>
    1.html
    var temp = xxxx的值就是上面的1 or 2.(就是从menu_advanced.html里点超链接传过来的值)
      

  7.   

    index.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>
    <frameset frameborder="1" cols="30%,*">
    <frame name="left" src="left.html">
    <frame name="content" src="">
    </frameset>
    <body>
    </body>
    </html>
     left.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <title>Untitled Document</title>
        </head>
        <body>
            <table>
                <tr>
                    <td valign="left" class="style2">
                        <a href="1.html?1" target="content">1 </a>
                    </td>
                </tr>
                <tr>
                    <td valign="left" class="style2">
                        <a href="1.html?2" target="content">2 </a>
                    </td>
                </tr>
            </table>
        </body>
    </html>
    1.hmtl
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <title>Untitled Document</title>
        </head>
        <script language="JavaScript">
            window.onload = function(){
    alert(document.URL.match(/[^?]+$/));
            }
        </script>
        <body>
        </body>
    </html>
      

  8.   

    10楼的朋友写到index.html 和 left.html ,我改写了一下1.hmtl,就无法实现ww取值,不知道是什么原因。
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>
    <script language="JavaScript">
    init(){
    var ww=document.URL.match(/[^?]+$/);
    }
    </script>
    <body onLoad="init()">
    <form method="post" name="f1">
    <script language="javascript" type="text/javascript">
    if(ww==1){document.write('<input id=uiViewApplyButton type=button value="123">&nbsp;');}
    else if(ww==2){document.write('<input id=uiViewApplyButton type=button value="456">&nbsp;');}
    else{document.write('<input id=uiViewApplyButton type=button value="000">&nbsp;');}
    </script>    
    </form>
    </body>
    </html>
      

  9.   

    像下面这样改一下,
    另外,请注意字符集的设定。<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
            <title>Untitled Document </title>
        </head>
        <body onLoad="init()">
            <form method="post" name="f1">
                <script language="javascript" type="text/javascript">
                    var ww = location.href.match(/[^?]+$/);
                    if (ww == 1) {
                        document.write(' <input id=uiViewApplyButton type=button value="123">&nbsp;');
                    }
                    else 
                        if (ww == 2) {
                            document.write(' <input id=uiViewApplyButton type=button value="456">&nbsp;');
                        }
                        else {
                            document.write(' <input id=uiViewApplyButton type=button value="000">&nbsp;');
                        }
                </script>
            </form>
        </body>
    </html>
      

  10.   

    非常感谢各位,我要结贴了。大家提供了很多方法,都很管用。只要不放在加载里。index.html <html> <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    <title>Untitled Document </title> 
    </head> 
    <frameset frameborder="1" cols="30%,*"> 
    <frame name="left" src="left.html"> 
    <frame name="content" src=""> 
    </frameset> 
    <body> </body> 
    </html> left.html <html> <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    <title>Untitled Document </title> 
    </head> 
    <body> <table> 
    <tr> <td valign="left"> <a href="1.html?1" target="content">1 </a> </td> </tr> 
    <tr> <td valign="left"> <a href="1.html?2" target="content">2 </a> </td> </tr>
    </html> 1.hmtl <html> <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    <title>Untitled Document </title> 
    </head> 
    <script language="JavaScript"> 
    var ww = location.href.match(/[^?]+$/);
    or
    var ww=document.URL.match(/[^?]+$/);
    or
    ww = location.search.replace(/^.*\D(\d+)$/, '$1'); 
    </script> 
    <body onLoad="init()"> 
    <form method="post" name="f1"> 
    <script language="javascript" type="text/javascript"> 
    if(ww==1){document.write(' <input id=uiViewApplyButton type=button value="123">&nbsp;');} 
    else if(ww==2){document.write(' <input id=uiViewApplyButton type=button value="456">&nbsp;');} 
    else{document.write(' <input id=uiViewApplyButton type=button value="000">&nbsp;');} 
    </script></form> </body> </html>如果还含有标记:left.html <html> <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    <title>Untitled Document </title> 
    </head> 
    <body> <table> 
    <tr> <td valign="left"> <a href="1.html?value=1" target="content">1 </a> </td> </tr> 
    <tr> <td valign="left"> <a href="1.html?value=2" target="content">2 </a> </td> </tr>
    </html> 1.hmtl <html> <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    <title>Untitled Document </title> 
    </head> 
    <script language="JavaScript"> 
    function GetQueryValue(name)    
    {           
    var   reg=new   RegExp("(^|&)"+   name   +"=([^&]*)(&|$)");           
    var   r=window.location.search.substr(1).match(reg);           
    if   (r!=null)   return   unescape(r[2]);           
    return   "";       
    }
    var ww=GetQueryValue("value");
    orfunction QueryString(qs)
    {
        s = location.href;
        var SharpIndex=s.indexOf("#");
        if (SharpIndex!=-1){s=s.substring(0,SharpIndex);}
        s = s.replace("?","?&").split("&");
        re = "";
        for(i=1;i<s.length;i++){if(s[i].indexOf(qs+"=")==0){re = s[i].replace(qs+"=","");}}
        return re;
    }
    var ww=QueryString("value");
    </script> 
    <body onLoad="init()"> 
    <form method="post" name="f1"> 
    <script language="javascript" type="text/javascript"> 
    if(ww==1){document.write(' <input id=uiViewApplyButton type=button value="123">&nbsp;');} 
    else if(ww==2){document.write(' <input id=uiViewApplyButton type=button value="456">&nbsp;');} 
    else{document.write(' <input id=uiViewApplyButton type=button value="000">&nbsp;');} 
    </script></form> </body> </html>