简体   繁体   English

我希望我的 html 页面在我提交某个输入时重定向到另一个 html 页面我该怎么做

[英]I want my html page to redirect to another html page when I submit a certain input how can i do that

strong text I need the html page to go to another page when i submit a certain input强文本当我提交某个输入时,我需要 html 页面到 go 到另一个页面

This can be done via HTML forms.这可以通过 HTML forms 来完成。 you need to use the action(where you want to redirect page) and method(GET,POST) attribute in form.您需要在表单中使用操作(要重定向页面的位置)和方法(GET,POST)属性。 for example例如

<form action="www.example.com" method="post">
<input type="text" name="firstname">
<input type="submit" name="submit">
</form>

on clicking submit it will redirect to the URL given in the action attribute.单击提交时,它将重定向到 action 属性中给出的 URL。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 检查电子邮件输入验证后,如何使用我的按钮将用户重定向到另一个HTML页面? - How do I redirect the user to another HTML page using my button after checking for email input validation? 当我单击特定数据时,如何重定向到另一个HTML页面 - How do i redirect to another html page when i click on the specific data 我如何在登录时将主 html 页面重定向到另一个 html 页面? - How would I redirect the main html page to another html page when I login? 如何通过单击HTML中的超链接重定向到另一页? - How can i redirect to another page by click on hyperlink in Html? 我想重定向到指定的 HTML 页面 - I want to redirect to specified HTML page 我如何将用户从另一个HTML页面重定向到HTML页面上的“部分”? - How can i redirect the user to a 'section' on an html page from another html page? 提交表单后如何将用户重定向到另一个页面? - How do I redirect user to another page after submit the form? 如何从一个 HTML 页面获取数据以在提交时更新另一个页面 - How do I get data from One HTML page to update the Another page on submit 当我提交表单输入类型=文件以使用 php 发送图像时,我想重定向到另一个页面 - when i submit form input type=file for send image with php i want redirect to an other page 我如何制作一个使用特定输入重定向到特定 html 页面的 js 代码? - How do i make a js code that redirects to a certain html page with a certain input?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM