In ASP. NET Used in Treeview , Linkbutton When the navigation is generated. For example, you can set their open location to a specified frame, as shown in figure Ifmpage ( This is through Target Set Be sure IFRAME Of Name Value Do not set ID Set ID Will be ineffective ) . When you pass Treeview, linkbutton When you navigate to the specified webpage, you will find that IFRAME Label SRC But not changed to the corresponding webpage Path. Is it depressing. I don't know what's going on IE Medium IFRAME Label SRC Value You have been writing Html The path of the webpage specified during the page. This may be IE One Bug ( Personally, it may also be for security, but you don't want ) .
After careful researchIFRAMEThe Study of attributes and methods found the solution to the problem. However, it is troublesome to look at it directly.CodeRight
1 Function login (para ){
2 VaR ifmpage = Para;
3 If (Para. tostring () ! = " [Object] " ){
4 Ifmpage = Document. getelementsbyname ( " Ifmpage " );
5 }
6 If (Ifmpage. SRC = Undefined)
7 Return - 1 ; // The ifmpage is not found.
8 If (Ifmpage. readystate = " Complete " )
9 {
10 Return Ifmpage. contentWindow. Location. href
11 }
12 }
In this case, the test is normal in IE8 Windows 7 flagship system.