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