我的代碼:後的onsubmit如何才能告訴三江源POST方法形式
<html> <body>
<p>When you submit the form, a function is triggered which alerts sometext.</p>
<form id="abc" action="https://www.w3schools.com/action_page.php"
onsubmit="myFunction()"> Enter name: <input type="text"
name="fname"> <input type="submit" value="Submit"> </form>
<script> function myFunction() {
alert("The form was submitted"); } </script>
</body> </html>
它運行正常,但我想提交後會顯示三江源改變形式ID,不警告,它顯示文本「謝謝你「像圖片:result
我的jsfiddle:https://jsfiddle.net/nguoicovan/adpjq8bc/
可你的jsfiddle測試,代碼不運行:(並提交形式 – Xerek