【发布时间】:2016-10-05 11:11:33
【问题描述】:
https://jsfiddle.net/ffkwgddL/
如果我单击我的第一个按钮,即介绍然后按空格键,我的代码中有三个按钮第一个按钮,第二个按钮和第三个按钮,它再次工作,因为我单击了第一个按钮,但如果我单击第一个按钮然后是第三个按钮,即单击以获取下一个内容,然后按空格它在我单击第三个按钮时起作用。我希望空格键和输入仅适用于第三个按钮,而不适用于任何其他按钮,抱歉,我的小提琴看起来不太好,因为它只适用于风景视图。
<body>
<div class="container" id="wrapper">
<div class="top">
<div class="heading">
<h1>Multiples</h1>
</div>
</div>
<div class="main-content">
<div class="content-left col-xs-3">
<div class="btns" role="group" aria-label="...">
<button class="btn btn-default .btn-lg text-break first-button">Introduction<br>
</button>
<br>
<button class="btn btn-default .btn-lg text-break second-button">Properties of Multiples</button>
</div>
</div>
<div class="content-right col-xs-9">
<div class="content-first-button">
<div class="button1_text1 well well-lg">A <b><i>multiple</i></b> is the product of the given numbers and some other counting numbers.</div>
<div class="button1_text2">
<div class="button1_text2_1"><b>e.g.-</b></div>
<div class="button1_text2_2"><br>
When we multiply the number by <b>1, 2, 3, 4 ....</b>and so on, </div>
<div class="button1_text2_3">We get multiples of that number.</div>
<div class="button1_text3"><b>Multiples of 3</b></div>
<center>
<div class="button1_text4">
<p class="abcd"><b>1  </b> x <b>  3</b>   = <b>   3</b></p>
<p><b>2  </b> x <b>  3</b>   = <b>   6</b></p>
<p><b>3  </b> x <b>  3</b>   = <b>   9</b></p>
<p class="abcde"><b>  4  </b> x <b>  3</b>   = <b>   12</b></p>
</div>
</center>
</div>
</div>
<div class="button2_text1"><b>Properties of Multiples</b></div>
<div class="button2_text2">
<ul class="fa-ul">
<li> <i class="fa fa-star" aria-hidden="true"></i> <b class="button2_text2_1">Every number is a multiple of itself</b> </li>
</ul>
<br>
<b class="button2_text2_2"><i>i.e.</i></b> <b class="button2_text2_3">1     x     15     =     15</b></div>
<br>
<div class="button2_text3">
<ul class="fa-ul">
<li> <i class="fa fa-star" aria-hidden="true"></i> <b class="button2_text3_1">The least multiple of a number is number itself</b> </li>
</ul>
<b class="button2_text3_2">1     x     15     =     15</b> <b class="button2_text3_3"><i>least multiple</i></b> <br>
<b class="button2_text3_4">2     x     15     =     30</b><br>
<b class="button2_text3_5">3     x     15     =     45</b><br>
<b class="button2_text3_6">4     x     15     =     60</b><br>
</div>
<div class="button3_text3_7 well well-lg"<b>Every multiple of a number is completely divisible by that number</b> </div>
<div class="button3_text3_8">
<ul class="fa-ul">
<li> <i class="fa fa-star" aria-hidden="true"></i><b class="abcdefg">Every number is a multiple of 1</b> </li>
</ul>
</div>
<div class="button3_text3_9">
<ul class="fa-ul">
<li> <i class="fa fa-star" aria-hidden="true"></i>
<div class="abcdef">There is no end to multiples of a number, hence there is no highest multiple of a number.</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="col-md-3 col-xs-3"></div>
<div class="col-md-3 col-xs-3"></div>
<div class="col-md-6 col-xs-6">
<button class="btn btn-default .btn-lg text-break third-button">Click to get next content</button>
</div>
</div>
</div>
<div id="warning-message"> this website is only viewable in landscape mode </div>
</body>
</html>
【问题讨论】:
标签: javascript jquery html css twitter-bootstrap