html,css。点击修改密码在黄色框内加载修改密码的页面。点击找回密码在黄色框加载找回密码的页面。

html,css。点击修改密码在黄色框内加载修改密码的页面。点击找回密码在黄色框加载找回密码的页面。,第1张

方法1:

两个都写了,用jquey控制显示、隐藏。

<button id="btn_reset_password">修改密码</button>

<button id="btn_get_password">找回密码</button>

<div id="reset_password">

</div>

<div id="get_password">

</div>

<script>

$('#btn_reset_password').on('click',function(){

$('#reset_password').show()

$('#get_password').hide()

})

$('#btn_get_password').on('click',function(){

$('#reset_password').hide()

$('#get_password').show()

})

</script>

方法2:

写在后端,用jquery异步加载

写js啊,

<script>

var username = document.getElementsClassName('bt_input')[0]

var password = document.getElementsClassName('bt_input')[1]

var button= document.getElementsClassName('logingBut')[0]

button.onclick=function(){

if(username .value=="user"&&password .value=="123456"){

location.href="下一个网页的网址"

}else{

alert("账号或密码错误!")

window.opener = null

window.open("", "_self")

window.close()

}

}

</script>

把这段代码放在</body>前面就好了,,纯手打,采纳哈


欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/zaji/6127097.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-15
下一篇 2023-03-15

发表评论

登录后才能评论

评论列表(0条)

保存