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

html-css012

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异步加载

需要准备的材料分别有:电脑、chrome浏览器、html编辑器。

1、首先打开html编辑器,新建一个html文件,例如:index.html。

2、在index.html中的<body>标签中,输入以下html代码:

<input type="text" placeholder="请输入账号" />

<input type="password" placeholder="请输入密码" />

3、浏览器运行index.html页面,此时的输入框有了提示文字“请输入账号”,密码框有了提示文字“请输入密码”。