doufan6544 2014-12-02 16:28
浏览 32
已采纳

通过单击一页内的特定链接显示不同的Html表单

i has file within my wordpress theme this file contains the signin, signup, lostpasswors and reset password forms with the required php codes. and in my header i have two buttons created by bootstrap codes us follow.

<div class="col-sm-3">
    <div id="user-notlogged-in" class="pull-right btn-group btn-group-lg" role="group">
        <button type="button" class="btn btn-info"><a class="signin" href="<?php echo bloginfo('url') ?>/login"><?php _e('Sign In'); ?></a></button>
        <button type="button" class="btn btn-default"><a class="signup" href="<?php echo bloginfo('url') ?>/login"><?php _e('Sign up'); ?></a></button>
    </div>
</div>

and in my login-register.php file i have above forms like below

<div id="signin-form">
</div>
<div id="signup-form">
</div>
<div id="resetpass-form">
</div>
<div id="newpass-form">
</div>

this link below contains full code in my login-register.php file login-register.php my questions

  1. i want when click on Sign In link only show me signin-form
  2. i want when click on Sign Up link only show me signup-form
  3. i want when i click on Lost Password? Link only show me resetpass-form
  4. i want when send me reset password mail and i clcik on reset password link only show me newpass-form
  • 写回答

2条回答 默认 最新

  • duanji8887 2014-12-02 16:39
    关注

    What you're looking for is some simple jquery. Try something like...

    onclick=$('#signin-form').show();
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥50 求解vmware的网络模式问题 别拿AI回答
  • ¥24 EFS加密后,在同一台电脑解密出错,证书界面找不到对应指纹的证书,未备份证书,求在原电脑解密的方法,可行即采纳
  • ¥15 springboot 3.0 实现Security 6.x版本集成
  • ¥15 PHP-8.1 镜像无法用dockerfile里的CMD命令启动 只能进入容器启动,如何解决?(操作系统-ubuntu)
  • ¥30 请帮我解决一下下面六个代码
  • ¥15 关于资源监视工具的e-care有知道的嘛
  • ¥35 MIMO天线稀疏阵列排布问题
  • ¥60 用visual studio编写程序,利用间接平差求解水准网
  • ¥15 Llama如何调用shell或者Python
  • ¥20 谁能帮我挨个解读这个php语言编的代码什么意思?