<script language=javascript>
function test()
{
str = document.all.txt.value;
if(/^['"]*$/g.test(str))
alert("right");
else
alert("error");
}
</script>
<input id=txt>
<input type=button onclick=test()>
function test()
{
str = document.all.txt.value;
if(/^['"]*$/g.test(str))
alert("right");
else
alert("error");
}
</script>
<input id=txt>
<input type=button onclick=test()>
for(var i=0;i<strIn.length;i++)
{
if strIn.substring(i,1)=="\""
{
return true;
}
}
return false;
}