Jquery 将外部html作为内联html导入
我有一个html页面,包含Jquery 将外部html作为内联html导入,jquery,Jquery,我有一个html页面,包含 <div id="recoverpass"> <h2>Recover Password</h2> <form action="#" method="post" name="recoverpass"> <p><label> Enter E-Mail Address: </label> <input type="text" name="email" i
<div id="recoverpass">
<h2>Recover Password</h2>
<form action="#" method="post" name="recoverpass">
<p><label> Enter E-Mail Address: </label> <input type="text" name="email" id="name" /></p>
<input type="submit" value="Recover Password" />
</form>
</div>
<div id="registernew">
<h2>Register New User</h2>
<form action="#" method="post" name="recoverpass">
<p><label> Enter E-Mail Address: </label> <input type="text" name="email" id="name" /></p>
<input type="submit" value="Recover Password" />
</form>
</div>
恢复密码
输入电子邮件地址:
注册新用户
输入电子邮件地址:
在我的index.html页面中,单击相应链接时会加载一个弹出窗口。我想要的是,当忘记密码弹出窗口被加载时,它应该从sth.html导入html,然后是recoverpass'div'的内容。当注册弹出窗口加载时,它应该从sth.html导入html,然后再导入registernew'div'的内容。易于处理
$("#popup").load("sth.html #recoverpass");
$("#popup").load("sth.html #registernew");