Koyarwa CodeW3C Yanan Gida
  • Yanarwaji HTML
  • Browser Script
  • Server Script
  • Yanarwaji Tutorial
  • Yanarwaji XML
  • Kita'arwa Rarraba
  • Kita'arwa Mutum

Course Schedule

JS Reference Manual

  • JS Reference Manual (Categorial)
  • JS Reference Manual (Alphabetical)

JavaScript

  • JS Array
  • JS Boolean
  • JS Class
  • JS Date
  • JS Error
  • JS Global
  • JS JSON
  • JS Map
  • JS Math
  • JS Number
  • JS Promise
  • JS RegExp
  • Hausa JS Set
  • JS String
  • Hausa JS Objects
  • JS Operator
  • JS Operator Precedence
  • JS Statement
  • JS Type Array

Window

  • Object Window
  • Window Console
  • Window History
  • Window Location
  • Window Navigator
  • Window Screen

HTML DOM

  • HTML Document
  • HTML Element
  • HTML Attribute
  • HTML Event
  • HTML Event ɗanɗin
  • HTML Collection
  • HTML NodeList
  • HTML DOMTokenList
  • HTML Style

Web API

  • API Canvas
  • API Console
  • API Fetch
  • API Fullscreen
  • API Geolocation
  • API History
  • API MediaQueryList
  • API Storage
  • API Validation
  • API Web

HTML ɗanɗin ɗanɗin

  • <a>
  • <abbr>
  • <address>
  • <area>
  • <article>
  • <aside>
  • <audio>
  • <b>
  • <base>
  • <bdo>
  • <blockquote>
  • <body>
  • <br>
  • <button>
  • <canvas>
  • <caption>
  • <cite>
  • <code>
  • <col>
  • <colgroup>
  • <datalist>
  • <dd>
  • <del>
  • <details>
  • <dfn>
  • <dialog>
  • <div>
  • <dl>
  • <dt>
  • <em>
  • <embed>
  • <fieldset>
  • <figcaption>
  • <figure>
  • <footer>
  • <form>
  • <head>
  • <header>
  • <h1> - <h6>
  • <hr>
  • <html>
  • <i>
  • <iframe>
  • <img>
  • <ins>
  • <input> button
  • <input> checkbox
  • <input> color
  • <input> date
  • <input> datetime
  • <input> datetime-local
  • <input> email
  • <input> file
  • <input> hidden
  • <input> image
  • <input> month
  • <input> number
  • <input> password
  • <input> radio
  • <input> range
  • <input> reset
  • <input> search
  • <input> submit
  • <input> text
  • <input> time
  • <input> url
  • <input> week
  • <kbd>
  • <label>
  • <legend>
  • <li>
  • <link>
  • <map>
  • <mark>
  • <menu>
  • <menuitem>
  • <meta>
  • <meter>
  • <nav>
  • <object>
  • <ol>
  • <optgroup>
  • <option>
  • <output>
  • <p>
  • <param>
  • <pre>
  • <progress>
  • <q>
  • <s>
  • <samp>
  • <script>
  • <section>
  • <select>
  • <small>
  • <source>
  • <span>
  • <strong>
  • <sub>
  • <summary>
  • <sup>
  • <table>
  • <tbody>
  • <td>
  • <tfoot>
  • <th>
  • <thead>
  • <tr>
  • <textarea>
  • </a></li> <li><a href="/ha/jsref/dom_obj_track.html" title="HTML DOM Track objeqta"><track></a></li> <li><a href="/ha/jsref/dom_obj_u.html" title="HTML DOM Underline objeqta"><u></a></li> <li><a href="/ha/jsref/dom_obj_ul.html" title="HTML DOM Ul objeqta"><ul></a></li> <li><a href="/ha/jsref/dom_obj_var.html" title="HTML DOM Variable objeqta"><var></a></li> <li><a href="/ha/jsref/dom_obj_video.html" title="HTML DOM Video objeqta"><video></a></li> </ul> <h2>其他参考手册</h2> <ul> <li><a href="/ha/jsref/obj_cssstyledeclaration.html" title="CSSStyleDeclaration objeqta">CSSStyleDeclaration</a></li> <li><a href="/ha/jsref/jsref_type_conversion.html" title="JavaScript tasiya yankin">JS 类型转换</a></li> </ul> </div> <div><h3><center> 选修课 </center><h3> <h2>课程推荐:</h2> <ul> <li><a href="/ha/howto/index.html" title="CodeW3C.com sabon bage">CodeW3C.com sabon bage</a></li> </ul> </div> </div> <div id="maincontent"> <div class="idea"> <a href="/"><button>English</button></a> <a href="/zh/"><button>中文</button></a> <a href="/oldzh/"><button>繁體中文</button></a> <a href="/ru/"><button>Русский</button></a> <a href="/fr/"><button>Français</button></a> <a href="/de/"><button>Deutsch</button></a> <a href="/es/"><button>Español</button></a> <a href="/pt/"><button>Português</button></a> <a href="/ja/"><button>日本語</button></a> <a href="/ko/"><button>한국어</button></a> <a href="/it/"><button>Italiano</button></a> <a href="/ar/"><button>عربي</button></a> <a href="/hi/"><button>हिंदी</button></a> <a href="/bn/"><button>বাংলা</button></a> <a href="/ms/"><button>Bahasa Malaysia</button></a> <a href="/my/"><button>မြန်မာ</button></a> <a href="/vi/"><button>Tiếng Việt</button></a> <a href="/th/"><button>ภาษาไทย</button></a> <a href="/lo/"><button>ລາວ</button></a> <a href="/id/"><button>Bahasa Indonesia</button></a> <a href="/ur/"><button>اردو</button></a> <a href="/ha/"><button>Hausa</button></a> <a href="/pl/"><button>Język polski</button></a> <a href="/pa/"><button>ਪੰਜਾਬੀ</button></a> <a href="/sv/"><button>Svenska</button></a> <a href="/da/"><button>Dansk</button></a> <a href="/nl/"><button>Nederlands</button></a> <a href="/tr/"><button>Türkçe</button></a> <a href="/fi/"><button>suom.</button></a> <a href="/el/"><button>Ελληνικά</button></a> <a href="/fa/"><button>فارسی</button></a> <a href="/sw/"><button>Kiswahili</button></a> <a href="/te/"><button>తెలుగు</button></a> <a href="/tl/"><button>wikang Galu</button></a> </div> <h1>Kita'arwa JavaScript String</h1> <div class="prenextnav"> <ul> <li> Hausa Previous Page <a href="/ha/jsref/jsref_obj_set.html" title="Kita'arwa JavaScript Set">Hausa JS Set</a></li> <li> Hausa Next Page <a href="/ha/jsref/jsref_obj_object.html" title="Kita'arwa JavaScript Object">Hausa JS Objects</a></li> </ul> </div> <div> <h2>JavaScript string</h2> <p>JavaScript 字符串存储一系列字符,例如 "Bill Gates"。</p> <p>字符串可以是双引号或单引号内的任何文本:</p> <pre class="language-js"> let carName1 = "Volvo XC60"; let carName2 = 'Volvo XC60'; </pre> <p class="tiy"><a target="_blank" href="/ha/tiy/t.html?f=jsck_strings">亲自试一试</a></p> <p>字符串索引(下标)是从零开始的:</p> <p>第一个字符在位置 0,第二个在 1,依此类推。</p> <p>如需有关字符串的知识,请访问我们的 <a href="/ha/js/js_strings.html" title="JavaScript string">JavaScript 字符串教程</a>。</p> </div> <div> <h2>字符串属性和方法</h2> <p>通常,像 "Bill Gates" 这样的字符串不能有方法或属性,因为它们不是对象。</p> <p>但是对于 JavaScript,方法和属性也可用于字符串,因为 JavaScript 在执行方法和属性时将字符串视为对象。</p> </div> <div> <h2>JavaScript 字符串方法和属性</h2> <table class="dataintable"> <tr> <th style="width: 30%;">Haukarau</th> <th>Ƙarantaccen</th> </tr> <tr> <td><a href="/ha/jsref/jsref_string_at.html" title="JavaScript String at() method">at()</a></td> <td>返回字符串中指定索引的字符。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_charat.html" title="JavaScript String charAt() method">charAt()</a></td> <td>返回字符串中指定索引(位置)的字符。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_charcodeat.html" title="JavaScript String charCodeAt() method">charCodeAt()</a></td> <td>返回字符串中指定索引处字符的 Unicode 值。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_codepointat.html" title="JavaScript String codePointAt() method">codePointAt()</a></td> <td>返回字符串中指定索引(位置)的 Unicode 值。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_concat_string.html" title="JavaScript String concat() method">concat()</a></td> <td>返回两个或多个连接的字符串。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_constructor_string.html" title="JavaScript String constructor property">constructor</a></td> <td>返回字符串的构造函数。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_endswith.html" title="JavaScript String endsWith() method">endsWith()</a></td> <td>返回字符串是否以指定值结尾。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_fromcharcode.html" title="JavaScript String fromCharCode() method">fromCharCode()</a></td> <td>将 Unicode 值作为字符返回。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_includes.html" title="JavaScript String includes() method">includes()</a></td> <td>返回字符串是否包含指定值。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_indexof.html" title="JavaScript String indexOf() method">indexOf()</a></td> <td>返回字符串中第一次出现指定值的索引(位置)。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_lastindexof.html" title="JavaScript String lastIndexOf() method">lastIndexOf()</a></td> <td>返回字符串中最后一次出现指定值的索引(位置)。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_length_string.html" title="JavaScript String length hauwzu faɗa">length</a></td> <td>返回字符串的长度。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_localecompare.html" title="JavaScript String localeCompare() hauwzu yauwarin">localeCompare()</a></td> <td>在当前区域设置下比较两个字符串。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_match.html" title="JavaScript String match() hauwzu yauwarin">match()</a></td> <td>在字符串中搜索值或正则表达式,并返回匹配项。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_string_padend.html" title="JavaScript String padEnd() hauwzu yauwarin">padEnd()</a></td> <td>在字符串末尾填充字符。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_string_padstart.html" title="JavaScript String padStart() hauwzu yauwarin">padStart()</a></td> <td>从字符串开头填充字符。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_prototype_string.html" title="JavaScript String prototype hauwzu faɗa">prototype</a></td> <td>允许您向对象添加属性和方法。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_repeat.html" title="JavaScript String repeat() hauwzu yauwarin">repeat()</a></td> <td>返回包含指定数量字符串副本的新字符串。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_replace.html" title="JavaScript String replace() hauwzu yauwarin">replace()</a></td> <td>在字符串中搜索模式,并返回替换第一个匹配项后的字符串。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_string_replaceall.html" title="JavaScript String replaceAll() hauwzu yauwarin">replaceAll()</a></td> <td>在字符串中搜索模式,并返回替换所有匹配项后的新字符串。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_search.html" title="JavaScript String search() hauwzu yauwarin">search()</a></td> <td>在字符串中搜索值或正则表达式,并返回匹配项的索引(位置)。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_slice_string.html" title="JavaScript String slice() hauwzu yauwarin">slice()</a></td> <td>提取字符串的一部分并返回新字符串。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_split.html" title="JavaScript String split() hauwzu yauwarin">split()</a></td> <td>将字符串拆分为子字符串数组。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_startswith.html" title="JavaScript String startsWith() hauwzu yauwarin">startsWith()</a></td> <td>检查字符串是否以指定字符开头。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_substr.html" title="JavaScript String substr() hauwzu yauwarin">substr()</a></td> <td>从字符串的指定索引(位置)开始提取指定数量的字符。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_substring.html" title="JavaScript String substring() hauwzu yauwarin">substring()</a></td> <td>提取字符串中两个指定索引(位置)之间的字符。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_tolocalelowercase.html" title="JavaScript String toLocaleLowerCase() hauwzu yauwarin">toLocaleLowerCase()</a></td> <td>使用主机的区域设置将字符串转换为小写字母并返回。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_tolocaleuppercase.html" title="JavaScript String toLocaleUpperCase() hauwzu yauwarin">toLocaleUpperCase()</a></td> <td>使用主机的区域设置将字符串转换为大写字母并返回。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_tolowercase.html" title="JavaScript String toLowerCase() hauwzu yauwarin">toLowerCase()</a></td> <td>返回转换为小写字母的字符串。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_tostring_string.html" title="JavaScript String toString() hauwzu yauwarin">toString()</a></td> <td>将字符串或字符串对象作为字符串返回。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_touppercase.html" title="JavaScript String toUpperCase() hauwzu yauwarin">toUpperCase()</a></td> <td>返回转换为大写字母的字符串。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_trim_string.html" title="JavaScript String trim() hauwzu yauwarin">trim()</a></td> <td>返回去除空格的字符串。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_string_trim_end.html" title="JavaScript String trimEnd() hauwzu yauwarin">trimEnd()</a></td> <td>返回去除末尾空格的字符串。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_string_trim_start.html" title="JavaScript String trimStart() hauwzu yauwarin">trimStart()</a></td> <td>返回去除开头空格的字符串。</td> </tr> <tr> <td><a href="/ha/jsref/jsref_valueof_string.html" title="JavaScript String valueOf() hauwzu yauwarin">valueOf()</a></td> <td>返回字符串或字符串对象的原始值。</td> </tr> </table> <p class="tip"><span>提示:</span>所有字符串方法都返回新值。它们不会改变原始变量。</p> </div> <div> <h2>字符串 HTML Wrapper 方法</h2> <p>HTML 包装器方法返回包装在 HTML 标记内的字符串。</p> <p>这些不是标准的方法,可能无法按预期工作。</p> <table class="dataintable"> <tr> <th style="width: 30%;">Haukarau</th> <th>Ƙarantaccen</th> </tr> <tr> <td><a href="/ha/jsref/jsref_anchor.html" title="JavaScript String anchor() hauwzu yauwarin">anchor()</a></td> <td>Fannar ɗanɗin taɗa ɗanɗin ɗanɗin ɗanɗin</td> </tr> <tr> <td><a href="/ha/jsref/jsref_big.html" title="JavaScript String big() hauwzu yauwarin">big()</a></td> <td>Fannar ɗanɗin taɗa ɗanɗin ɗanɗin ɗanɗin</td> </tr> <tr> <td><a href="/ha/jsref/jsref_blink.html" title="JavaScript String blink() hauwzu yauwarin">blink()</a></td> <td>Fannar ɗanɗin taɗa ɗanɗin ɗanɗin ɗanɗin</td> </tr> <tr> <td><a href="/ha/jsref/jsref_bold.html" title="JavaScript String bold() hauwzu yauwarin">bold()</a></td> <td>Fannar ɗanɗin taɗa ɗanɗin ɗanɗin ɗanɗin</td> </tr> <tr> <td><a href="/ha/jsref/jsref_fixed.html" title="JavaScript String fixed() hauwzu yauwarin">fixed()</a></td> <td>Fannar ɗanɗin taɗa ɗanɗin ɗanɗin ɗanɗin</td> </tr> <tr> <td><a href="/ha/jsref/jsref_fontcolor.html" title="JavaScript String fontcolor() hauwzu yauwarin">fontcolor()</a></td> <td>Fannar ɗanɗin taɗa ɗanɗin ɗanɗin ɗanɗin</td> </tr> <tr> <td><a href="/ha/jsref/jsref_fontsize.html" title="Hausa JavaScript String fontsize() Method">fontsize()</a></td> <td>Fannar ɗanɗin taɗa ɗanɗin ɗanɗin ɗanɗin</td> </tr> <tr> <td><a href="/ha/jsref/jsref_italics.html" title="Hausa JavaScript String italics() Method">italics()</a></td> <td>Fannar ɗanɗin taɗa ɗanɗin ɗanɗin ɗanɗin</td> </tr> <tr> <td><a href="/ha/jsref/jsref_link.html" title="Hausa JavaScript String link() Method">link()</a></td> <td>Fannar ɗanɗin taɗa ɗanɗin ɗanɗin ɗanɗin</td> </tr> <tr> <td><a href="/ha/jsref/jsref_small.html" title="Hausa JavaScript String small() Method">small()</a></td> <td>Fannar ɗanɗin taɗa ɗanɗin ɗanɗin ɗanɗin</td> </tr> <tr> <td><a href="/ha/jsref/jsref_strike.html" title="Hausa JavaScript String strike() Method">strike()</a></td> <td>Fannar ɗanɗin taɗa ɗanɗin ɗanɗin ɗanɗin</td> </tr> <tr> <td><a href="/ha/jsref/jsref_sub.html" title="Hausa JavaScript String sub() Method">sub()</a></td> <td>Fannar ɗanɗin taɗa ɗanɗin ɗanɗin ɗanɗin</td> </tr> <tr> <td><a href="/ha/jsref/jsref_sup.html" title="Hausa JavaScript String sup() Method">sup()</a></td> <td>Fannar ɗanɗin taɗa ɗanɗin ɗanɗin ɗanɗin</td> </tr> </table> </div> <div> <h2>String ɗanɗin</h2> <p>Hausa Strings are a basic data type of JavaScript. The String class provides methods for operating on primitive string values.</p> <p>Hausa String object's <a href="/ha/jsref/jsref_length_string.html" title="JavaScript String length hauwzu faɗa">Hausa length attribute</a>Hausa Declared the number of characters in the string.</p> <p>Hausa The String class defines a large number of methods for operating on strings, such as extracting characters or substrings from strings, or retrieving characters or substrings.</p> <p class="important"><span>Hausa Note:</span>Hausa JavaScript strings are immutable (immutable), and the methods defined in the String class cannot change the content of the string. Like <a href="/ha/jsref/jsref_touppercase.html" title="JavaScript String toUpperCase() hauwzu yauwarin">Hausa String.toUpperCase()</a> Hausa Such methods return a completely new string, not modifying the original string.</p> <p>Hausa In earlier Netscape code base JavaScript implementations (such as Firefox implementations), the behavior of strings is like a read-only character array. For example, to extract the third character from a string s, you can use s[2] instead of the more standard s.charAt(2). Additionally, when applying a for/in loop to a string, it will enumerate the array index of each character in the string (but note that the ECMAScript standard stipulates that the length property cannot be enumerated). Because the array behavior of strings is not standard, it should be avoided.</p> </div> <div id="toc"> <h2>Hausa Supplementary Books</h2> <p>Hausa For more information, please read the relevant content in the JavaScript Advanced Tutorial:</p> <dl> <dt><a href="/ha/js/pro_js_referencetypes.html" title="Hausa ECMAScript Reference Type">Hausa ECMAScript Reference Type</a></dt> <dd>Hausa Reference types are usually called classes (class) or objects. This section explains the predefined reference types of ECMAScript.</dd> </dl> </div> <div class="prenextnav"> <ul> <li> Hausa Previous Page <a href="/ha/jsref/jsref_obj_set.html" title="Kita'arwa JavaScript Set">Hausa JS Set</a></li> <li> Hausa Next Page <a href="/ha/jsref/jsref_obj_object.html" title="Kita'arwa JavaScript Object">Hausa JS Objects</a></li> </ul> </div><div style="background-color:#fcfdf8; padding:0;"> </div> </div> <!-- maincontent end --> <div id="sidebar"> <div><h3><center> Hausa Toolbox </center><h3> <h5 id="tools_reference"><a href="/ha/jsref/index.html">Kita'arwa JavaScript da HTML DOM</a></h5> <h5 id="tools_example"><a href="/ha/js/js_examples.html">Hausa JavaScript Examples</a></h5> <h5 id="tools_quiz"><a href="/ha/js/js_quiz.html">Hausa JavaScript Quiz</a></h5> <h5 id="tools_tutorial"><a href="/ha/js/index.html">Hausa JavaScript Tutorial</a></h5> </div> <div><h3><center> Hausa Sponsor Links </center><h3> <div id="sbtg"> <script src="/myjs/zzsr.js"></script> </div> </div> </div> <div id="footer"> <p id="p1"> Hausa The content provided by CodeW3C.com is for training and testing purposes only, and does not guarantee the accuracy of the content. Risks associated with the use of this site's content are not related to this site. All rights reserved. </p> <p id="p2"> <a href="/ha/about/index.html" title="Hausa About CodeW3C.com">Hausa About CodeW3C.com</a> <a href="/ha/about/about_helping.html" title="Hausa Help CodeW3C.com">Hausa Help CodeW3C.com</a> <a href="/ha/about/about_use.html" title="Hausa About Usage">Hausa Terms of Use</a> <a href="/ha/about/about_privacy.html" title="Hausa About Privacy">Hausa Privacy Terms</a> <a href="http://www.comfortsoftwaregroup.com/" target="_blank"><img src="/comfortsoftwaregroup.png"></a> <a href="http://www.ce4e.com/" target="_blank"><img src="/poweredby.png" alt="Kamfanin da ke tsafta hanyar Ce4e.com"></a> </p> </div> </div> <!-- wrapper end --> <script src="/myjs/tongji.js"></script> </body> </html>