JavaScript 文字列操作 新しいページはコチラ
提供: yonewiki
(→文字列検索(文字列変数後方検索) lastIndexOf) |
(→文字列検索(文字列変数後方検索) lastIndexOf) |
||
695行: | 695行: | ||
strData18 = new String("文字列検索(lastIndexOf)-last"); | strData18 = new String("文字列検索(lastIndexOf)-last"); | ||
− | document.write(".indexOf() : ",strData18, " ,検索位置 = ", strData18. | + | document.write(".indexOf() : ",strData18, " ,検索位置 = ", strData18.lastIndexOf("last"), "</BR>"); |
</syntaxhighlight> | </syntaxhighlight> | ||
704行: | 704行: | ||
strData18 = new String("文字列検索(lastIndexOf)-last"); | strData18 = new String("文字列検索(lastIndexOf)-last"); | ||
− | document.write(".lastIndexOf() : ",strData18, " ,検索位置 = ", strData18. | + | document.write(".lastIndexOf() : ",strData18, " ,検索位置 = ", strData18.lastIndexOf("last",strData18.length -1), "</BR>"); |
</yjavascript> | </yjavascript> | ||