Recently I wrote two front-end pages of the management background, one of which is the management background. The left-side menu navigation and the right-side content page are two IFRAME pages. The requirement is that when you click the leading flight above, IFRAME on the left and IFRAME on the right call different links. I personally recommend using jquery for implementation,CodeConcise and highly scalable.
Jquery section:
Function Gotourl ( Url_a , Url_ B )
{
$ ( ' # Ifr_a ' ) . Get ( 0 ) . SRC = Url_a ;
$ ( ' # Ifr_ B ' ) . Get ( 0 ) . SRC = Url_ B ;
}
HTML call:
< A Href = " Javascript: void (0) " Onclick = " Gotourl ('HTTP: // g.cn/', 'http://baidu.com '); " > Click here. The content of the two IFRAME files will change. </ A >
< IFRAME SRC = " Http://mrthink.net/ " ID = " Ifr_a " Name = " Ifr_a " Frameborder = " 0 " > </ IFRAME >
< IFRAME SRC = " Http://mrthink.net/ " ID = " Ifr_ B " Name = " Ifr_ B " Frameborder = " 0 " > </ IFRAME >
You can use js to determine the iframe id and assign different SRC values to different IDs, but the code is a little more complicated.
Mr. Think's blog: http://mrthink.net/javascript-jquery-twourl-twoifram/