0

我有下面的jsps。在这里,当我单击按钮(块)时,它应该禁用左框架。在这里,当我尝试这样做时,我可以将框架变灰,但链接仍然有效,我希望完全禁用该框架。

左.html

    <!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body><form name="hi" id="hi"><table>
            <tr><td colspan="3">
            <a href="View_Queries.jsp" target="tgt">Queries</a><br/></td></tr>
            <tr><td colspan="3"><a href="Welcome.jsp" target="tgt" name="home" id="home">home</a></td>
            <tr><td colspan="3"><a href="WL_Verif.jsp" target="tgt">MyAlloc</a></td></tr><br/>
            <tr><td colspan="3"><a href="On_Hold.jsp" target="tgt">On Hold</a></td></tr>
            <tr><td colspan="3"><a href="logout.jsp" target="_parent">logout</a></td></tr>
            </tr></table></form>
    </body>
</html>

欢迎.jsp

 <%-- 
    Document   : Welcome
    Created on : Dec 13, 2012, 2:12:27 PM
    Author     : u0138039
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script type="text/javascript">
            function disabledFrame()
            {
               parent.Left.document.hi.disabled=true;
            }
        </script>
    </head>
    <body>
        <h1>Hello World!</h1>
        <input type="button" value="block" onclick="disabledFrame()">
    </body>
</html>

索引.jsp

    <HTML>

<FRAMESET rows="10%, *"> 
    Welcome
 <FRAME src="time.jsp" marginheight="25%" marginwidth="75%"> 
<FRAMESET cols="15%,*">
<FRAME src="Left.html" id="Left" name="Left"> 

<FRAME src="right.html" name="tgt" > </frameset>
<NOFRAMES> 
This displays if frames are not supported. 
</NOFRAMES> 
</FRAMESET> 
 </style>
</HTML>

谢谢

4

0 回答 0