方式一:通過submit按鈕提交
<!DOCTYPE html> <html> <head> <title>通過submit按鈕提交</title> <meta charset="UTF-8"/> </head> <body> <form action="" method="get" id="form1"> <input type="text" name="username"></input> <input type="submit" value="提交" /> </form> </body> </html>
方式二:通過一般按鈕button提交
<!DOCTYPE html> <html> <head> <title>通過一般按鈕提交</title> <meta charset="UTF-8"/> </head> <body> <form action="" method="get" id="form1"> <input type="text" name="username"></input> <input type="button" value="ok" name="sb" onclick="submit1();"> </form> <script type="text/javascript"> function submit1() { var form1 = document.getElementById("form1"); form1.action = " bjpowernode.html"; form1.submit(); } </script> </body> </html>
方式三:通過超鏈接提交
<!DOCTYPE html> <html> <head> <title>通過超鏈接提交</title> <meta charset="UTF-8"/> </head> <body> <a href="bjpowernode.html?username=張三">通過超鏈接提交</a> </body> </html>
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com