【发布时间】:2020-05-05 17:39:10
【问题描述】:
我在主页上嵌入了登录和登录页面。但我想要的是,如果在登录页面上单击提交,则应该打开一个新页面“关于” - 不是嵌入页面,而是主页转到关于页面。
在我尝试通过 jquery 将页面加载到主页但代码根本不起作用之前
主页
<body>
<header>
<div class="btn"><button class="login">login</button><button class="sign">signup</button></div>
<div class="login" id="log" name="Login">
<embed src="login.html" class="login hidden" style="width:45%;
height:auto !important; border:none;"></embed>
</div>
<div class="signup">
<embed src="signup.html" class="signup hidden"
style="width:50%; height:50% !important; border:none;"
scrolling="no"></embed>
<script type="text/javascript">
$('button.login').on('click',function(){
$('embed.login').removeClass('hidden');
$('embed.signup').addClass('hidden');
});
$('button.sign').on('click',function(){
$('embed.signup').removeClass('hidden');
$('embed.login').addClass('hidden');
});
</script>
登录页面代码
<body>
<form class="hidden login" name="Log"><input type="email" name="email" placeholder="enter email" required>
<input type="password" name="password" placeholder="enter password" required>
<button > submit</button>
</form>
【问题讨论】:
标签: jquery html css hyperlink load