📄 ajax与freetextbox解决方案 - bolik‘s aio blog - 博客园.htm
字号:
(</SPAN><SPAN style="BACKGROUND: white; COLOR: maroon">document</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">getElementById</SPAN><SPAN
style="BACKGROUND: white">)</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white"> {</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white">
</SPAN><SPAN style="BACKGROUND: white; COLOR: maroon">dyniframe</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">dyniframe</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">length</SPAN><SPAN
style="BACKGROUND: white">] = </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">document</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">getElementById</SPAN><SPAN
style="BACKGROUND: white">(</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">iframeids</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">i</SPAN><SPAN
style="BACKGROUND: white">]);</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white">
</SPAN><SPAN style="BACKGROUND: white; COLOR: navy">if</SPAN><SPAN
style="BACKGROUND: white"> (</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">dyniframe</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">i</SPAN><SPAN
style="BACKGROUND: white">] && !</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">window</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">opera</SPAN><SPAN
style="BACKGROUND: white">)</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white">
{</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white">
</SPAN><SPAN style="BACKGROUND: white; COLOR: maroon">dyniframe</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">i</SPAN><SPAN
style="BACKGROUND: white">].</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">style</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">display</SPAN><SPAN
style="BACKGROUND: white">=</SPAN><SPAN
style="BACKGROUND: white; COLOR: red">"block"</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white">
</SPAN><SPAN style="BACKGROUND: white; COLOR: navy">if</SPAN><SPAN
style="BACKGROUND: white"> (</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">dyniframe</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">i</SPAN><SPAN
style="BACKGROUND: white">].</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">contentDocument</SPAN><SPAN
style="BACKGROUND: white"> && </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">dyniframe</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">i</SPAN><SPAN
style="BACKGROUND: white">].</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">contentDocument</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">body</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">offsetHeight</SPAN><SPAN
style="BACKGROUND: white">) </SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white">
</SPAN><SPAN style="BACKGROUND: white; COLOR: maroon">dyniframe</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">i</SPAN><SPAN
style="BACKGROUND: white">].</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">height</SPAN><SPAN
style="BACKGROUND: white"> = </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">dyniframe</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">i</SPAN><SPAN
style="BACKGROUND: white">].</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">contentDocument</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">body</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">offsetHeight</SPAN><SPAN
style="BACKGROUND: white">; </SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white">
</SPAN><SPAN style="BACKGROUND: white; COLOR: navy">else</SPAN><SPAN
style="BACKGROUND: white"> </SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">if</SPAN><SPAN style="BACKGROUND: white">
(</SPAN><SPAN style="BACKGROUND: white; COLOR: maroon">dyniframe</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">i</SPAN><SPAN
style="BACKGROUND: white">].</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">Document</SPAN><SPAN
style="BACKGROUND: white"> && </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">dyniframe</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">i</SPAN><SPAN
style="BACKGROUND: white">].</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">Document</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">body</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">scrollHeight</SPAN><SPAN
style="BACKGROUND: white">)</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white">
</SPAN><SPAN style="BACKGROUND: white; COLOR: maroon">dyniframe</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">i</SPAN><SPAN
style="BACKGROUND: white">].</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">height</SPAN><SPAN
style="BACKGROUND: white"> = </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">dyniframe</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">i</SPAN><SPAN
style="BACKGROUND: white">].</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">Document</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">body</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">scrollHeight</SPAN><SPAN
style="BACKGROUND: white">;</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white">
}</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white"> }</SPAN></P>
<P style="MARGIN: 0px"> </P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white"> </SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">if</SPAN><SPAN style="BACKGROUND: white">
((</SPAN><SPAN style="BACKGROUND: white; COLOR: maroon">document</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">all</SPAN><SPAN
style="BACKGROUND: white"> || </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">document</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">getElementById</SPAN><SPAN
style="BACKGROUND: white">) && </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">iframehide</SPAN><SPAN
style="BACKGROUND: white">==</SPAN><SPAN
style="BACKGROUND: white; COLOR: red">"no"</SPAN><SPAN
style="BACKGROUND: white">)</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white"> {</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white">
</SPAN><SPAN style="BACKGROUND: white; COLOR: navy">var</SPAN><SPAN
style="BACKGROUND: white"> </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">tempobj</SPAN><SPAN
style="BACKGROUND: white">=</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">document</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">all</SPAN><SPAN
style="BACKGROUND: white">? </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">document</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">all</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">iframeids</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">i</SPAN><SPAN
style="BACKGROUND: white">]] : </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">document</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">getElementById</SPAN><SPAN
style="BACKGROUND: white">(</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">iframeids</SPAN><SPAN
style="BACKGROUND: white">[</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">i</SPAN><SPAN
style="BACKGROUND: white">])</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white">
</SPAN><SPAN style="BACKGROUND: white; COLOR: maroon">tempobj</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">style</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">display</SPAN><SPAN
style="BACKGROUND: white">=</SPAN><SPAN
style="BACKGROUND: white; COLOR: red">"block"</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white"> }</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white"> }</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white">}</SPAN></P>
<P style="MARGIN: 0px"> </P>
<P style="MARGIN: 0px"><SPAN
style="BACKGROUND: white; COLOR: navy">if</SPAN><SPAN style="BACKGROUND: white">
(</SPAN><SPAN style="BACKGROUND: white; COLOR: maroon">window</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">addEventListener</SPAN><SPAN
style="BACKGROUND: white">)</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white"> </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">window</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">addEventListener</SPAN><SPAN
style="BACKGROUND: white">(</SPAN><SPAN
style="BACKGROUND: white; COLOR: red">"load"</SPAN><SPAN
style="BACKGROUND: white">, </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">dyniframesize</SPAN><SPAN
style="BACKGROUND: white">, </SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">false</SPAN><SPAN
style="BACKGROUND: white">)</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="BACKGROUND: white; COLOR: navy">else</SPAN><SPAN
style="BACKGROUND: white"> </SPAN><SPAN
style="BACKGROUND: white; COLOR: navy">if</SPAN><SPAN style="BACKGROUND: white">
(</SPAN><SPAN style="BACKGROUND: white; COLOR: maroon">window</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">attachEvent</SPAN><SPAN
style="BACKGROUND: white">)</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white"> </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">window</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">attachEvent</SPAN><SPAN
style="BACKGROUND: white">(</SPAN><SPAN
style="BACKGROUND: white; COLOR: red">"onload"</SPAN><SPAN
style="BACKGROUND: white">, </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">dyniframesize</SPAN><SPAN
style="BACKGROUND: white">)</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="BACKGROUND: white; COLOR: navy">else</SPAN></P>
<P style="MARGIN: 0px"><SPAN style="BACKGROUND: white"> </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">window</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">onload</SPAN><SPAN
style="BACKGROUND: white">=</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">dyniframesize</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="BACKGROUND: white; COLOR: blue"></</SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">script</SPAN><SPAN
style="BACKGROUND: white; COLOR: blue">></SPAN></P>
<P style="MARGIN: 0px"> </P></DIV>
<DIV
style="FONT-SIZE: 10pt; BACKGROUND: #f8f8f8; COLOR: black; FONT-FAMILY: consolas">
<P style="MARGIN: 0px"><SPAN
style="BACKGROUND: white">HtmlEditorWrapper.ascx.cs</SPAN></P></DIV></DIV>
<DIV
style="FONT-SIZE: 10pt; BACKGROUND: #f8f8f8; COLOR: black; FONT-FAMILY: consolas">
<P style="MARGIN: 0px"> </P>
<DIV
style="FONT-SIZE: 10pt; BACKGROUND: #f8f8f8; COLOR: black; FONT-FAMILY: consolas">
<P style="MARGIN: 0px"><SPAN
style="BACKGROUND: white; COLOR: navy">using</SPAN><SPAN
style="BACKGROUND: white"> </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">System</SPAN><SPAN
style="BACKGROUND: white">;</SPAN></P>
<P style="MARGIN: 0px"><SPAN
style="BACKGROUND: white; COLOR: navy">using</SPAN><SPAN
style="BACKGROUND: white"> </SPAN><SPAN
style="BACKGROUND: white; COLOR: maroon">System</SPAN><SPAN
style="BACKGROUND: white">.</SPAN><SPAN
style="BACKGROUND: white; CO
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -