我有这个
HTML代码:
<div id="welcomename"> <h1>Welcome! What's your name?</h1> <input type="text" class="form" name="name" placeholder="Your name here!" id="name"/> <input type="button" onclick="clicked();" value="I'm ready!"/> </div> <br>
这非常完美,但我有理由,我需要< br>在div’welcomename’里面.当我这样做时,它不起作用.
其他代码:
<div id="hiddenDiv" style="display: none;"> <h1 id="welcomehowareyou">How are you today,?</h1> <form id="welcomehowareyou2" method="post"> <select name="mood" onchange="popup(this.options.selectedIndex)"> <option value="" disabled selected>How are you?</option> <option>I'm doing great,thanks!</option> <option>I'm fine,but could be better</option> <option>I feel absolutely terrible today.</option> <!--<input type="submit" value="Done!"/>--> </form> <p></p> </div>
解决方法
请在这里查看小提琴 –
http://jsfiddle.net/ghxce8dr/
它工作正常.我添加了< p>< / p>对于这两个div.
它工作正常.我添加了< p>< / p>对于这两个div.
<div id="welcomename"> <h1>Welcome! What's your name?</h1> <input type="text" class="form" name="name" placeholder="Your name here!" id="name"/> <input type="button" onclick="clicked();" value="I'm ready!"/> </div> <p></p> Text After First Break <div id="hiddenDiv"> <h1 id="welcomehowareyou">How are you today,?</h1> <select name="mood" onchange="popup(this.options.selectedIndex)"> <option value="" disabled selected>How are you?</option> <option>I'm doing great,but could be better</option> <option>I feel absolutely terrible today.</option></select> <!--<input type="submit" value="Done!"/>--> <p></p> Text After Second Break </div>
希望这会帮助你.