Editframewindow → IFRAME object. contentWindow
1 editframeworkerdoc ument. designMode = 'on ';
2 editframeworkerdoc ument. open ();
3 editframeworkerdoc ument. writeln ('<HTML> 4 editframeworkerdoc ument. writeln ('5 editframeworkerdoc ument. Close ();
The IFRAME can be edited normally in IE6 +, opera9 + (excluding 9.5), ff2 +, and safari. If you write opera9.5, the IFRAME cannot be edited or an error is returned. The problem is as follows:
1 editframeworkerdoc ument. open ();
2 editframeworkerdoc ument. writeln ('<HTML> 3 editframeworkerdoc ument. writeln ('4 editframeworkerdoc ument. Close ();
This code is written to allow ff2 + to be edited normally. other browsers can ignore this code, but opera9.5 cannot be ignored now.
The solution is to judge and execute the ff2 + (gecko kernel) browser.
1 editframeworkerdoc ument. designMode = 'on ';
2 If (navigator. useragent. indexof ('gecko ')>-1 & navigator. useragent. indexof ('khtml') =-1 ){
3 editframeworkerdoc ument. open ();
4 editframeworkerdoc ument. writeln ('<HTML> 5 editframeworkerdoc ument. writeln ('6 editframeworkerdoc ument. Close ();
7}