Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
460 views
in Technique[技术] by (71.8m points)

javascript - 使用javascript:如何创建一个警报窗口以显示提交的表单值?(Using javascript: how to create an alert window to display submitted form values?)

I am new to javascript.

(我是javascript新手。)

I am wanting to learn how to display submitted values from a form through an alert window.

(我想学习如何通过警报窗口显示表单中提交的值。)

Is this possible?

(这可能吗?)

For example, if a user fills in the form with their first and last name as "John Smith," once he clicks "submit" an alert() will show up saying "You input First Name:John Last Name: Smith"

(例如,如果用户填写的姓氏和名字分别为“ John Smith”,则在他单击“ submit”后,将显示一个alert()并显示“您输入的名字:John Last Name:Smith”)

  ask by naanobot translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Below link example is give you idea how to submit from with JavaScript validation.

(下面的链接示例让您了解如何使用JavaScript验证进行提交。)

https://www.w3schools.com/js/js_validation.asp

(https://www.w3schools.com/js/js_validation.asp)

let me know you still facing any issue.

(让我知道您仍然遇到任何问题。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...