JavaScript 文字列操作 新しいページはコチラ
提供: yonewiki
(→文字列検索(表示コンテンツ内検索) find) |
(→文字列検索(表示コンテンツ内検索) find) |
||
545行: | 545行: | ||
サンプルスクリプト | サンプルスクリプト | ||
<syntaxhighlight lang="javascript" line start="1"> | <syntaxhighlight lang="javascript" line start="1"> | ||
+ | <!--[if !IE]> | ||
bFindResult = find("麻薬"); | bFindResult = find("麻薬"); | ||
document.write("検索結果 = ", nData1, "</BR>"); | document.write("検索結果 = ", nData1, "</BR>"); | ||
+ | <![endif]--> | ||
+ | <!--[if IE]> | ||
+ | サンプルスクリプトはIEでは動作しません。 | ||
+ | <![endif]--> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
554行: | 559行: | ||
<yjavascript> | <yjavascript> | ||
− | + | <!--[if !IE]> | |
+ | bFindResult = find("麻薬"); | ||
document.write("検索結果 = ", nData1, "</BR>"); | document.write("検索結果 = ", nData1, "</BR>"); | ||
+ | <![endif]--> | ||
+ | <!--[if IE]> | ||
+ | サンプルスクリプトはIEでは動作しません。 | ||
+ | <![endif]--> | ||
</yjavascript> | </yjavascript> | ||