-3

文字列全体を検索する場合、Javascript の match() が機能しませんか?

4

1 に答える 1

0

Try this.. I think you misplaced the quotes in the function

<body onload="myFunction()">
</body>
<script type="text/javascript"> 
function myFunction()
{
var str="entire string"; 
var n=str.match(str); // var n=str.match('entire string');
alert(n)
}
</script>
于 2013-02-15T10:35:38.213 に答える