JavaScript 文字列操作 新しいページはコチラ

提供: yonewiki
移動: 案内, 検索
(文字列検索(文字列変数後方検索) lastIndexOf)
(文字列検索(文字列変数後方検索) lastIndexOf)
693行: 693行:
 
サンプルスクリプト
 
サンプルスクリプト
 
<syntaxhighlight lang="javascript" line start="1">
 
<syntaxhighlight lang="javascript" line start="1">
strData18 = new String("文字列検索(indexOf)");
+
strData18 = new String("文字列検索(lastIndexOf)-last");
  
document.write(".indexOf() : ",strData18, " ,検索位置 = ", strData18.indexOf("index"), "</BR>");
+
document.write(".indexOf() : ",strData18, " ,検索位置 = ", strData18.indexOf("last"), "</BR>");
 
</syntaxhighlight>
 
</syntaxhighlight>
  
702行: 702行:
  
 
<yjavascript>
 
<yjavascript>
strData18 = new String("文字列検索(indexOf)");
+
strData18 = new String("文字列検索(lastIndexOf)-last");
  
document.write(".indexOf() : ",strData18, " ,検索位置 = ", strData18.indexOf("index"), "</BR>");
+
document.write(".indexOf() : ",strData18, " ,検索位置 = ", strData18.indexOf("last"), "</BR>");
 
</yjavascript>
 
</yjavascript>
  

2016年7月25日 (月) 00:00時点における版



個人用ツール
名前空間

変種
操作
案内
ツールボックス