An integer representing the index of an opti//Displays 8document.write("<P>The index of the first w from the beginning is " + anyString.indexOf("w"))//Displays 10document.write("<P>The index of the first w from the end is " + anyString.lastIndexOf("w"))//Displays 6document.write("<P>The index of ''new'' from the beginning is " + anyString.indexOf("new"))//Displays 6document.write("<P>The index of ''new'' from the end is " + anyString.lastIndexOf("new"))
The previous example produces the same output as the following htm:
<BLINK>Hello, world</BLINK><P><B>Hello, world</B><P><I>Hello, world</I><P><STRIKE>Hello, world</STRIKE>
无忧CMS,5ucms.org建站仿站首选!
上一篇:5ucms帮助javascript手冊-r 下一篇:5ucms仿站,javascript手冊-g |
|
本站声明:本网站所载文章等内容,目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如涉及作品内容、版权及其它问题,请在30日内与本网联系(Email:3876307#qq.com),我们将在第一时间删除内容。若原创内容转载请注明出处。 5ucms仿站,javascript手冊-i的关键词: |