php页面中,
有个按纽 <INPUT type="image" src="css/images/es_share.gif" align="right" name="submit">是发表内容的确定按纽,
现要:点上面的按纽时要弹出一个登陆框
此登陆框要是小页面型的,只含 三行(用户名+密码+确定)
这样一来显示效果就好多了,就不用跳到另外的页面去登陆了,
确定登陆的函数是
check_login($username,$password)

  ...
}上面的功能怎么实现呀,多谢

解决方案 »

  1.   

    你是不是想要DISCUZ样的登录效果?
      

  2.   

    <INPUT type="image" src="css/images/es_share.gif" align="right" name="submit" onclick="document.getElementById('loginform').style.display='block'">
    <div style="position:absolute;right:0;z-index:1;display:block;background-color:#EEEEEE;width:250;height:100;padding:0;margin:0;text-align:center;" id="loginform">
    <span style="font-size:13;font-weight:bold;float:right;color:white;cursor:pointer" onclick="this.parentNode.style.display='none'">关闭</span>
    <form name='myform' action="check_login.php" method="POST">
    <div style="display:block;width:230;height:80;margin:10,10,10,10px;padding:0px;border:1px solid white">
    username:<input type= "text" style="background-color:transparent;margin-top:10px" value="username">
    password:<input type= "text" style="background-color:transparent;margin-top:10px" value="password">
    <input type= "submit" style="background-color:transparent;margin-top:10px;margin:10,10,10,0px" value="reset"><input type= "submit" style="background-color:transparent;margin:10,0,10,10px" value="submit" onclick="check_login();">
    </div>
    </form>
    </div>
      

  3.   

    多谢二位,
    回二楼的,是的,想做个 DISCUZ 那样的登陆效果。。
    大家帮我想想,
      

  4.   

    直接DISCUZ论坛的代码就OK了,大部分还是CSS效果
      

  5.   

    jquery可以实现吗,,
    jquery怎么实现呀
      

  6.   


    可以的,有插件的,去找找
    好想有个yprompt
      

  7.   

    ext也可以的·················
      

  8.   

    div+css 2楼的应该行。
    PS:Dreamweaver上面也有类似的插件,我以前弄过一个类似的,谷歌以下。
      

  9.   

    不就是像csdn现在这样的嘛?他发帖提交数据时用ajax检测一下登录状态,没登录就show出一个层,注意这个层必须是"模式层",即必须锁定这个层为当前焦点,不可再操作网页其他部分。层里面包含一个表单,填好信息后ajax把数据发到服务器验证,通过登录后hide这个层。然后就可以发帖了。至于用jquery或纯js代码其实都一样。jquery只不过更省事一些。
      

  10.   

    1 <a href="jslogin.php?height=120&width=300&modal=true" class="thickbox" >
    2 thickbox.js(jquery)