js比较文本框数据大小 if ((parseInt(document.form.price1.value)) > (parseInt(document.form.price2.value))) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <body><form name=form1><input type=text name="price1"><br><input type=text name="price2"><br><input type=button value="比较大小" onclick="check()"><br></form><script>function check(){var price1=parseFloat(document.all.form1.price1.value);var price2=parseFloat(document.all.form1.price2.value);if(price1>price2)alert('price1大于price2')elsealert('price1小于price2')}</script></body> JS 在火狐浏览器上不显示 类继承的问题 js单击第一次不能正常运行,第二次就正常是怎么回事? js<head>与</head>之间的函数数量有限制? 一道js题,求高手指点 checkbox新问题,请高手帮忙,谢谢! 怎么样让弹出的窗口的关闭按扭变灰色? 在线急球(如何把text框里的全角空格替换成半角空格) 急!请兄弟们帮忙,在线等待! 那里有快速实现GIS电子地图开发的案例或者企业API开发文档? 客户端脚本的问题? 谁有可以对文本框进行编辑的程序
<form name=form1>
<input type=text name="price1"><br>
<input type=text name="price2"><br>
<input type=button value="比较大小" onclick="check()"><br>
</form>
<script>
function check()
{
var price1=parseFloat(document.all.form1.price1.value);
var price2=parseFloat(document.all.form1.price2.value);
if(price1>price2)
alert('price1大于price2')
else
alert('price1小于price2')
}
</script>
</body>