Overview:
First on my layout chart:
UL in each Li bread with a ' a ' hyperlink, can guess, I want to not click Ul->li inside each A, link to a different page, here, I use the IFRAME to complete.
The main HTML code is:
1 <Divclass= "Warp">2 <Divclass= "title">3 <ulID= "Fengcai_title">4 <Li><ahref="#">Teacher's Demeanor 1</a></Li>5 <Li><ahref="#">Teacher's Demeanor 2</a></Li>6 <Li><ahref="#">Teacher's Demeanor 3</a></Li>7 </ul>8 </Div>9 <Divclass= "Content">Ten <iframescrolling= "Auto"Target= "_parent"ID= "Content_frame"src= "content/tar.html"> </iframe> One </Div>
Then download the relevant jquery library, complete with the jquery code:
<script type= "Text/javascript" src= "jq/jquery-2.1.0.min.js" ></script><script type= "Text/javascript "Src=" jq/jquery-2.1.0-vsdoc.js "></script><script type=" Text/javascript "src=" Jq/jQuery2.1.js "> </script><script type= "Text/javascript" > function dd () { $ ("#fengcai_title Li a "). Click (function() { $ (this. InnerHTML +". html "); }); </script>
Where the page file is uniformly placed in the ' content ' directory, the page's file name corresponds to the text in a. The DD () function can be called in the OnLoad event of the body.
jquery-Dynamic Set UL li a link target