节点样式清除

来源:互联网 发布:手机贴纸软件 编辑:程序博客网 时间:2024/05/22 03:03

  this.parent.document.getElementById('mainFrame').src=url;

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>

    <script type="text/javascript" src="js/jquery-1.4.1.min.js"></script>

    <script type="text/javascript">
  function menuFunction(name,url){

         $("li").children().each(

                                 function()

                                 {

                                               if($(this).attr("id")==name){

                                                $(this).attr("class","selectnomal");

                                               }

                                               else{

                                                        $(this).attr("class","");

                                               }

                                 }

           )
 

}


    </script>


    <style type="text/css">
    #menu li a:link
    { 
    color: #FF0000;
    }
    #menu li a:visited
    { 
    color: #00FF00
    }
    #menu li a:hover
    {
    color: #FF00FF; cursor:hand;
    }
    #menu li a.selectnomal { color:yellow   }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <ul id="menu">
                <li><a id="link1"   onclick="menuFunction('link1','#')"><span>链接一</span></a><br />
                    <a id="link2"   onclick="menuFunction('link2','#')"><span>链接二</span></a><br />
                    <a id="link3"  onclick="menuFunction('link3','#')"><span>链接三</span></a></li>
            </ul>
        </div>
    </form>
</body>
</html>

原创粉丝点击