两个“表单动作”一行 [英] Two "form action's" on one line

查看:94
本文介绍了两个“表单动作”一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚完成登录并在我的网站上进行了注册,现在我正在清理工作,但是后来我遇到了这个问题,我在一页上有两个表单操作,每个表单都转到另一个页面,足够简单,但我似乎无法将它们全部放在一行。

I have just finished putting a login and register bit on my website and now I'm just cleaning things up, but then I came to this problem I have two form action's on one page, each one goes to a different page, easy enough, but I can't seem to get them both on one line.

以下是表单操作的代码:

Here is the code for the form actions:

<form action='logout.php' method='POST'>           
<input type='submit' value='Logout' />      
</form>                      
<form action='changepassword.php' method='POST'>     
<input type='submit' value='Change password' />       
</form>

我尝试过

<form action='logout.php' method='POST'>           
<input type='submit' value='Logout' />                           
<form action='changepassword.php' method='POST'>     
<input type='submit' value='Change password' />       
</form>

但两个按钮都移至同一位置

but both buttons go to the same location

该网站为 www.crossception.com ,则需要登录才能解决此问题
我已经为每个使用
用户名的用户设置了登录名和密码:stackoverflow
密码:test101

the website is www.crossception.com, you will need to login to get to this problem I've already made a login and password for every one to use username : stackoverflow password : test101

非常感谢您

connor

(15岁)

thank you very much
connor
(aged 15)

推荐答案

<span style="float:left;">
    <form action='logout.php' method='POST'>           
        <input type='submit' value='Logout' />      
    </form>   
</span>
<span style="float:right;">
    <form action='changepassword.php' method='POST'>     
        <input type='submit' value='Change password' />       
    </form>
</span>

这篇关于两个“表单动作”一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆