【问题标题】:input username and password and buttons输入用户名和密码以及按钮
【发布时间】:2014-04-21 21:12:27
【问题描述】:

在 php 或 html 页面上我该怎么做:

名称 密码 和许多按钮

如果用户按下按钮1,我们将重定向到:

http://domain.com/login.php?button1=123&name=test&password=111

按钮2: http://domain.com/login.php?button2=456&name=test&password=111

按钮3: http://domain.com/login.php?button3=789&name=test&password=111

谢谢

【问题讨论】:

    标签: button passwords


    【解决方案1】:
    You have this simple option according to me.
    
       <form action='login.php' method='get'>
        <input type='text' name='name'>
        <input type='password' name='password'>
        <input type='submit' name='button1' value='123'>
        <input type='submit' name='button2' value='456'>
        <input type='submit' name='button2' value='789'>
       </form>
    
    
    Hope it helps
    

    【讨论】:

    • 感谢您的回答,但通过这种方式,我无法将每个按钮的名称设置为:button1 名称是欢迎链接是:domain.com/login.php?button1=123&name=test&password=111 现在:domain.com/login.php?welcome=123&name=test&password=111
    • 兄弟,如果你喜欢答案,请先点赞:) 问题是我认为你不清楚形式的概念。要将 button1=123 更改为 welcome=123,您只需将 "button1" 的名称参数更改为 "welcome" 即可。为了更好地理解,只需将上面的回复代码复制到文件中,然后用扩展名 .html 命名它现在在浏览器中打开这个文件并播放更改参数,看看它是如何工作的......
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-02
    • 1970-01-01
    • 2012-05-16
    • 1970-01-01
    • 2015-10-04
    相关资源
    最近更新 更多