问题描述
我刚刚完成登录并在我的网站上进行了注册,现在我正在清理工作,但是后来我遇到了这个问题,我在一页上有两个表单操作,每个表单都转到另一个页面,足够简单,但我似乎无法将它们全部放在一行。
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
该网站为,则需要登录才能解决此问题
我已经为每个使用
用户名的用户设置了登录名和密码:stackoverflow
密码:test101
the website is www.crossception.com, you will need to login to get to this problemI've already made a login and password for every one to useusername : stackoverflowpassword : 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>
这篇关于两个“表单动作”一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!