javascript realize page finished loading click on the link automatically displays the right frame information page

javascript realize page finished loading click on the link automatically displays the right frame information page, the default page when it is convenient, and can easily change the default display of this content needs to be displayed after the user logs on, as long as the change var source = document.all. link ID;

<script language="JavaScript" type="text/JavaScript">
function autoclick()
{
var source=document.all.userinfo;
source.click();
}
window.attachEvent('onload',autoclick);
</script>

 

 

left.jsp the original display only need to click on the right side of the HTML code

        <tr class="t01" id="dwfl" >
         <td width="15" class="ac"></td>
         <td width="17"  valign="middle"><img src='images/dir5.gif' ></td>
     <td width="18" class="ac" valign="middle"><img src='images/dir2.gif' border=0></td>
           <td height="22" valign="bottom" class="ac" >
            <p onclick="setColor(dwfl)">
            <a href="userinfo.jsp" target="mainFrame" class="ac" id="userinfo">用户信息</a>
            </p>
           </td>
    </tr>

Reproduced in: https: //my.oschina.net/usenrong/blog/197818

Guess you like

Origin blog.csdn.net/weixin_34101784/article/details/92028891