jquery を使用して非表示のフォームを表示します。Submit
ユーザーがクリックしてから を押すと、フォームを自動的に表示する方法を知りたいですback button
。New Account
ユーザーが戻るボタンをクリックした後、フォームを表示するために再度クリックする必要はありません。
私は現在、これらの作業コードを持っています:
<head>
<script src="https://code.jquery.com/jquery-latest.js">
</script>
<script type="text/javascript">
$(function() {
$('#register_link').click(function() {
$('#show_form').toggle();
return false;
});
});
</script>
</head>
<a href="http://www.google.com/">Google</a>
|
<a href="#" id="register_link">New Account</a>
<div id="show_form" style="display: none;">
<form id="register_form" method="post" action="verify.php">
Username
<inputname="username" id="username" type="text">
<br>
Email
<input name="email" id="email" type="email">
<br>
<input class="button_register" type="submit" value="Create New Account"
/>
</form>
</div>
例: http://jsfiddle.net/n9uGH/17/
それは実際に可能ですか?前もって感謝します