<script>
function check()
{var tempstr
tempstr=ReplaceAll(document.form.temp.value,",","*")
alert(tempstr);
}
function ReplaceAll(str, sptr, sptr1)
{
while (str.indexOf(sptr) >= 0)
{
str = str.replace(sptr, sptr1);
}
return str;
}
</script>
<form onsubmit="check();" name="form">
<input type="text" size="58" name="temp"/>
<input type="submit" value="asdf" />
</form>
更多信息请查看IT技术专栏