开发者

can't redirect form on submit

开发者 https://www.devze.com 2023-01-19 01:37 出处:网络
Ok - I know I am being an idiot but I can not seem to get this form to redirect as I want it to: <form id=\"post\" method=\"post\" action=\"\" name=\"post\" onSubmit=\"window.location=\'http://www

Ok - I know I am being an idiot but I can not seem to get this form to redirect as I want it to:

    <form id="post" method="post" action="" name="post" onSubmit="window.location='http://www.website.com/overview'" >
        <input t开发者_高级运维ype="hidden" name="terms-and-conditions" value="true">
        <p class="submit">
            <input id="agree" type="submit" value="I Agree" name="agree"> 
            <input type="button" value="I Disagree" onClick="window.location='http://www.website.com'">
        </p>
    </form>

When the button type is "submit" it won't redirect in my PHP page. I have a feeling I am missing something obvious...

Thanks!


just do

<form id="post" method="post" action="http://www.website.com/overview" name="post">
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号