javascript 的alert的变量输出


<form name="testform" method="post" action="add.php">
<input type="text" name="username" id="username"/>
<input type="text" name="tel" id="tel" />
<nput type="submit" name="send" value="提交订单" onclick="return CheckForm()"/>
</form>

//fmcheck.js

function CheckForm(){
var username = document.getElementById("username").value;
var tel = document.getElementById("tel").value;

var info="您好,您订购的信息为:姓名:"+username+",电话:"+tel;
alert (info);

}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM