⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 string.html

📁 ajax开发框架prototype中文说明帮助
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<HR>

<A NAME="toUpperCase()"><!-- --></A><H3>
toUpperCase</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/String.html" title="net.conic.prototype 中的类">String</A> <B>toUpperCase</B>()</PRE>
<DL>
<DD>返回一个字符串,该字符串中的字母被转换为小写字母。不影响当前对象的内部状态。
<P>
<DD><DL>

<DT><B>返回:</B><DD>返回一个字符串,该字符串中的字母被转换为小写字母。toLowerCase 方法对非字母字符不会产生影响。 <p><b>Example:</b></p><pre>        alert("This is a STRING object".toUpperCase()); //THIS IS A STRING OBJECT</pre></DL>
</DD>
</DL>
<HR>

<A NAME="stripTags()"><!-- --></A><H3>
stripTags</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/String.html" title="net.conic.prototype 中的类">String</A> <B>stripTags</B>()</PRE>
<DL>
<DD>将字符串中HTML或者XML标签全部移除的方法。prototype增强方法
<P>
<DD><DL>

<DT><B>返回:</B><DD>被移除后的HTML或者XML标签内部的字符串值,不影响对象本身 <p><b>Example:</b></p><pre>        alert("<body><div id=\"aaa\">test<div></body>".stripTags());   //test</pre></DL>
</DD>
</DL>
<HR>

<A NAME="stripScripts()"><!-- --></A><H3>
stripScripts</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/String.html" title="net.conic.prototype 中的类">String</A> <B>stripScripts</B>()</PRE>
<DL>
<DD>将字符串中scripts块全部移除。prototype的增强方法
<P>
<DD><DL>

<DT><B>返回:</B><DD>被移除后的字符串的值,不影响对象本身 <p><b>Example:</b></p><pre>        var s = "&lt;script>alert('aaa');&lt;/script>";        alert(s.stripScripts());//显示为空</pre></DL>
</DD>
</DL>
<HR>

<A NAME="extractScripts()"><!-- --></A><H3>
extractScripts</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>extractScripts</B>()</PRE>
<DL>
<DD>将字符串中所有的以&lt;script />包含的块的内容以数组的形式返回。prototype增强方法
<P>
<DD><DL>

<DT><B>返回:</B><DD>Array <p><b>Example:</b></p><pre>var s = "&lt;script>alert(\"aaa\");&lt;/script\>";        s += "&lt;script>var lazyLoadFunction = new Object(); lazyLoadFunction.test = function(){return  \"ccc\";}&lt;/script\>";alert(s.extractScripts());s.evalScripts();alert(lazyLoadFunction.test());</pre></DL>
</DD>
</DL>
<HR>

<A NAME="evalScripts()"><!-- --></A><H3>
evalScripts</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>evalScripts</B>()</PRE>
<DL>
<DD>将字符串中所有的以&lt;script />包含的块的代码做执行,并将每次执行的结果返回。 prototype增强方法 <p><b>此方法常用于页面不刷新的后加载处理脚本,新web开发模式中常用.</b>
<P>
<DD><DL>

<DT><B>返回:</B><DD>将每次执行块所执行的结果返回。一般只用来判断被执行的script块的数目.  <p><b>Example:</b></p><pre>var s = "&lt;script>alert(\"aaa\");&lt;/script\>";        s += "&lt;script>var lazyLoadFunction = new Object(); lazyLoadFunction.test = function(){return  \"ccc\";}&lt;/script\>";alert(s.extractScripts());s.evalScripts();alert(lazyLoadFunction.test()); //显示: ccc</pre></DL>
</DD>
</DL>
<HR>

<A NAME="escapeHTML()"><!-- --></A><H3>
escapeHTML</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/String.html" title="net.conic.prototype 中的类">String</A> <B>escapeHTML</B>()</PRE>
<DL>
<DD>按照HTML标准将字符串的编码返回,如<变成&lt等; prototype增强方法
<P>
<DD><DL>

<DT><B>返回:</B><DD>String <p><b>Example:</b></p><pre>        var s = "&lt;b>ABCDEFG</b\>";        document.write(s.escapeHTML() + "&lt;br>");        document.write(s.unescapeHTML() + "&lt;br>" );        var s2 = "&lt;b>ABCDEFG&lt;/b\>";        document.write(s2.escapeHTML() + "&lt;br>");        document.write(s2.unescapeHTML() + "&lt;br>");</pre></DL>
</DD>
</DL>
<HR>

<A NAME="unescapeHTML()"><!-- --></A><H3>
unescapeHTML</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/String.html" title="net.conic.prototype 中的类">String</A> <B>unescapeHTML</B>()</PRE>
<DL>
<DD>按照HTML标准的将字符串的值返回,如<pre><</pre>变成<code><pre>&lt;<pre></code>。 prototype增强方法
<P>
<DD><DL>

<DT><B>返回:</B><DD>String <p><b>Example:</b></p><pre>        var s = "&lt;b>ABCDEFG</b\>";        document.write(s.escapeHTML() + "&lt;br>");        document.write(s.unescapeHTML() + "&lt;br>" );        var s2 = "&lt;b>ABCDEFG&lt;/b\>";        document.write(s2.escapeHTML() + "&lt;br>");        document.write(s2.unescapeHTML() + "&lt;br>");</pre></DL>
</DD>
</DL>
<HR>

<A NAME="toQueryParams()"><!-- --></A><H3>
toQueryParams</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>toQueryParams</B>()</PRE>
<DL>
<DD>将一个querystring字符串对象拆分成js的Array对象,以NV(Name->Value)的方式存储,类似Hash.prototype增强方法
<P>
<DD><DL>

<DT><B>返回:</B><DD>parameters 返回类似一个hash的Array对象 <p>对querystring拆分的原则遵照以字符'?'开头(如果没有'?'字符则从字符串第一个字符开始)以字符'/'结尾(如果没有字符'/',则默认为字符串的结尾)的中间字符串片断进行分析。<p><b>Example:</b></p><pre>        var s = "?property1=111&property2=222&property3=333";        alert(s.toQueryParams()["property2"]);  //222        alert(s.toQueryParams()["property1"]);  //111</pre></DL>
</DD>
</DL>
<HR>

<A NAME="toArray()"><!-- --></A><H3>
toArray</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>toArray</B>()</PRE>
<DL>
<DD>将字符串分解成单个字符的数组集合。prototype增强方法
<P>
<DD><DL>

<DT><B>返回:</B><DD>Array ABCDEFG => A,B,C,D,E,F,G<p><b>Example:</b></p><pre>        var s = "ABCDEFG";        alert(s.toArray());     //A,B,C,D,E,F,G</pre></DL>
</DD>
</DL>
<HR>

<A NAME="parseQuery()"><!-- --></A><H3>
parseQuery</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/Array.html" title="net.conic.prototype 中的类">Array</A> <B>parseQuery</B>()</PRE>
<DL>
<DD>prototype增强方法
<P>
<DD><DL>

<DT><B>返回:</B><DD>Array<DT><B>另请参见:</B><DD><A HREF="../../../net/conic/prototype/String.html#toQueryParams()"><CODE>toQueryParams()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="camelize()"><!-- --></A><H3>
camelize</H3>
<PRE>
public <A HREF="../../../net/conic/prototype/String.html" title="net.conic.prototype 中的类">String</A> <B>camelize</B>()</PRE>
<DL>
<DD>将从以"-"号分隔的字符串中去除"-"号,并将"-"号后面的字符串的第一个字符改成大写形式. <br/>此方法常用于处理标签样式的属性名与元素的样式属性间转换; <br>例如: background-color->backgroundColor、border-width->borderWidth、overflow-x->overflowX等等
<P>
<DD><DL>

<DT><B>返回:</B><DD>返回一个不以"-"分隔的字符串,并有"-"后面的字符串的第一个元素必须大写</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="跳过导航链接"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>类</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/String.html"><FONT CLASS="NavBarFont1"><B>使用</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>已过时</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../net/conic/prototype/Prototype.html" title="net.conic.prototype 中的类"><B>上一个类</B></A>&nbsp;
&nbsp;<A HREF="../../../net/conic/prototype/Try.html" title="net.conic.prototype 中的类"><B>下一个类</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?net/conic/prototype/String.html" target="_top"><B>框架</B></A>  &nbsp;
&nbsp;<A HREF="String.html" target="_top"><B>无框架</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>所有类</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>所有类</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  摘要:&nbsp;嵌套&nbsp;|&nbsp;<A HREF="#field_summary">字段</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">构造函数</A>&nbsp;|&nbsp;<A HREF="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息:&nbsp;<A HREF="#field_detail">字段</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">构造函数</A>&nbsp;|&nbsp;<A HREF="#method_detail">方法</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -