I want to run this html code only when I click a button:
<div class="modal-bg">
<div id="modal">
<span>Sign In<a href="#close" id="close">×</a></span>
<form>
<input id="username" name="username" type="textbox" placeholder="Username" required>
<input id="password" name="password" type="password" placeholder="Password" required>
<a id="forgot-link" href="#">Forgot password?</a>
<button name="submit" id="submit" type="submit">Sign in</button>
</form>
</div>
</div>
The button's html code is:
<span class="button" onclick="javascript:buttonClicked();">Sign In</span>
I want to create the buttonClicked() function in order to load the html code above (the form etc). Any ideas?