[英]How to post the form tag action value in ejs?
is there any know that? 有什么知道吗?
I'm testing some javascript as follows 我正在测试一些JavaScript,如下所示
function mem_join_next() { if (document.mem_join.email.value == "") { alert("please input your email ID"); document.mem_join.email.focus(); return; } document.mem_join.submit(); }
<form name="mem_join" action="/join_step_3" method="post"> <div class="col-xs-12 id"> <p><span>EMAIL</span><span class="star">*</span> </p> <input name='email' class="email1" type="text" style="IME-MODE: disabled" size="11">@ <input class="email2" type="text"> <div class="email-check">email_check</div> </div> <div class="col-xs-6 next" align="right"> <a onClick="mem_join_next()" style="cursor:pointer"> <img src="/page_imgs/member_img/btn-next.jpg"> </a> </div>
It's code what i want to run. 这是我要运行的代码。
But when It is processing, the screen come out the 404 not found error. 但是当正在处理时,屏幕上出现404 not found错误。
even it is right route. 即使是正确的路线。
I think the post is not working 我认为该职位无效
cause if i go straight way to single URL address( localhost/join_step_3
) , the screen come out the /join_step_3
address screen. 因为如果我直接进入单个URL地址( localhost/join_step_3
),则屏幕显示出/join_step_3
地址屏幕。
but if i go From join_step_2
form next button TO join_step_3
, It is 404 not found
please hell me! 但是,如果我从join_step_2
表单的下一个按钮转到join_step_3
,则404 not found
请join_step_3
我! GOD PROGRAMMERS! 神的程序员!
If you directly typed the url and it worked means the page at localhost/join_step_3
worked using GET
, because the browser url uses the GET Method
. 如果您直接键入url并且它起作用,则意味着localhost/join_step_3
的页面使用GET
起作用,因为浏览器url使用GET Method
。
So, it is quite possible that your localhost/join_step_3
doesn't support POST Method
. 因此,您的localhost/join_step_3
很可能不支持POST Method
。 Therefore, either add the post support on the page depending on the server-side scripting you use, or change method="post"
to method="get"
in your client html. 因此,根据您使用的服务器端脚本在页面上添加后支持,或者在客户端html中将method="post"
更改为method="get"
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.