var a = "abcdefggdefg32asdf38"; document.write ("Origin:"+a+"<br />") document.write("bold:"+a />");document.write(" strike()+"< <br />)); />>); />");document.write("superscript:"+a.sup()+"< <bbr />)); />");document.write("uppercase:"+a.toLowercase()+" <br />") ตัวละครดัชนีดัชนี: "+A.Charat (3)+" <br /> "<br />); อักขระดัชนี: "+A.Charat (3)+" <br/> "/>"); // ที่นี่มันควรจะเป็น "d" document.write ("return index:"+a.indexof ("f")+"<br/>"); // ที่นี่ควรเป็น 5document.write 9Document.Write ("Search String:"+A.Search ("F")+"<br/>"); // ที่นี่ควรเป็น 5, เหมือนกับ documentof document.write ("แทนที่สตริง:"+a.replace ("a", ")+" <br/> "); /> "); // แทนที่ a ในสตริงด้วย adocument.write (" return substring: "+a.slice (1,3)+" <br /> "); /> "); // มันควรจะเป็น bc, ส่งคืน substring จากดัชนี 1 ถึง 3-1 document.write (" split string: "+a.split (" d "). toString ()+" <br/> "); // โปรด d เป็นตัวแยก, แยกสตริง ดัชนี 1 และความยาวคือ 2 นี่คือ bcdocument.write ("ส่งคืน substring:"+a.substring (1,3)+"<br/>"); // เหมือนกับ sclice (), ส่งคืนเอกสารย่อย write ("Match:"+a.match (// d+/)+"<br/>"); document.write ("Match:"+A.Match (// d+/)+"<br/>/>"); // การจับคู่ปกติส่งคืนผลการจับคู่นี่คือ 32