JavaScript 文字列操作 新しいページはコチラ
提供: yonewiki
(→文字列検索(文字列変数後方検索) lastIndexOf) |
(→文字列検索(文字列変数後方検索) lastIndexOf) |
||
693行: | 693行: | ||
サンプルスクリプト | サンプルスクリプト | ||
<syntaxhighlight lang="javascript" line start="1"> | <syntaxhighlight lang="javascript" line start="1"> | ||
− | strData18 = new String("文字列検索( | + | strData18 = new String("文字列検索(lastIndexOf)-last"); |
− | document.write(".indexOf() : ",strData18, " ,検索位置 = ", strData18.indexOf(" | + | document.write(".indexOf() : ",strData18, " ,検索位置 = ", strData18.indexOf("last"), "</BR>"); |
</syntaxhighlight> | </syntaxhighlight> | ||
702行: | 702行: | ||
<yjavascript> | <yjavascript> | ||
− | strData18 = new String("文字列検索( | + | strData18 = new String("文字列検索(lastIndexOf)-last"); |
− | document.write(".indexOf() : ",strData18, " ,検索位置 = ", strData18.indexOf(" | + | document.write(".indexOf() : ",strData18, " ,検索位置 = ", strData18.indexOf("last"), "</BR>"); |
</yjavascript> | </yjavascript> | ||