- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我有一些复杂的 html 和一个小按钮下拉菜单,它会自动用预定值填充某些字段。当我单击该按钮上的其中一个选项时,javascript 函数会触发,但 Accordion 折叠起来,这会阻止用户看到单击该按钮的结果。除此之外,单击 Accordion 中的其他任何地方都会折叠它,从而阻止用户填写任何字段。
如何防止这种行为,以便仅当您单击面板标题时它才会关闭?
我的 HTML 示例:
<div class="panel panel-default" data-toggle="collapse" data-target="#collapse-7">
<div class="panel-heading">
<h3 class="panel-title" style="font-size: 20px">TAXATION (Residual)</h3>
</div>
<div id="collapse-7" class="panel-collapse collapse in">
<div class="panel-body">
<div class="row">
<div class="col-lg-10 bg-info">
<h4>Rating criteria:</h4>
<div class="col-sm-4"><p>1: Not capable of performing</p><p>2: Capable with significant / frequent intervention</p></div>
<div class="col-sm-4"><p>3: Capable with limited / periodic intervention</p><p>4: Capable with no intervention</p></div>
<div class="col-sm-4"><p>A: Advanced experience</p><p>B: Basic experience</p></div>
</div>
<div class="col-lg-2">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
Default all to... <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="#" onclick="defaulter('7', 'A')">A</a></li>
<li><a href="#" onclick="defaulter('7', 'B')">B</a></li>
</ul>
</div>
</div>
</div>
<div class="row">
<table class="table">
<tbody><tr style="background-color: #DDD;">
<th colspan="5" style="font-size: 16px">
Competency: TX(R)1 - Calculates income tax payable & prepares income tax return for an individual
</th>
</tr>
<tr>
<th></th>
<th style="vertical-align: middle">Tasks to be performed:</th>
<th></th>
<th style="text-align: center; vertical-align: middle">Your Rating</th>
<th style="text-align: center; vertical-align: middle">
A / B
</th>
</tr>
<tr>
<td style="vertical-align: middle">TX(R)1.1</td>
<td style="vertical-align: middle; width: 60%">Collects and calculates the information needed to file the tax return for an individual, considering: · inclusion and classification of income from different sources (for example, employment including fringe benefits and lump sum benefits, property, business, capital gain / loss, other income ) · exclusion of exempt income · deductibility of expenses (for example, contributions to pension or retirement funds, income protection policies, assets used for trade purposes, legal fees and study at home)</td>
<td></td>
<td style="vertical-align: middle">
<input type="hidden" name="values[0].CompetencySkillId" value="TX(R)1.1">
<input style="text-align: center" min="1" max="4" data-bv-integer="true" data-bv-greaterthan-message="Invalid input" data-bv-greaterthan="true" data-bv-greaterthan-inclusive="false" data-bv-greaterthan-value="0" type="number" name="values[0].Rating" class="form-control">
</td>
<td style="vertical-align: middle">
<input style="text-align: center;" pattern="([ABab])" data-bv-regexp-message="This value must be A or B" type="text" name="values[0].AorB" class="form-control AorB-7">
</td>
</tr>
<tr>
<td style="vertical-align: middle">TX(R)1.2</td>
<td style="vertical-align: middle; width: 60%">Prepares the income tax return</td>
<td></td>
<td style="vertical-align: middle">
<input type="hidden" name="values[1].CompetencySkillId" value="TX(R)1.2">
<input style="text-align: center" min="1" max="4" data-bv-integer="true" data-bv-greaterthan-message="Invalid input" data-bv-greaterthan="true" data-bv-greaterthan-inclusive="false" data-bv-greaterthan-value="0" type="number" name="values[1].Rating" class="form-control">
</td>
<td style="vertical-align: middle">
<input style="text-align: center;" pattern="([ABab])" data-bv-regexp-message="This value must be A or B" type="text" name="values[1].AorB" class="form-control AorB-7">
</td>
</tr>
<tr>
<td colspan="5">
<div class="form-group">
<label class="col-sm-4 control-label">
Trainee’s reflection on professional skills utilised in demonstrating their competence in the performance of these tasks:
</label>
<div class="col-sm-8">
<input type="hidden" name="values[2].CompetencySkillId-Reflection" value="TX(R)1"><textarea rows="3" name="values[2].Rating" class="form-control"></textarea>
</div>
</div>
</td>
</tr>
<tr>
<td colspan="5">
<div class="form-group">
<label class="col-sm-4 control-label">
Trainee’s comment i.r.o. reviewer’s rating for this competency:
</label>
<div class="col-sm-8">
<input type="hidden" name="values[3].CompetencySkillId-Comment" value="TX(R)1"><textarea rows="3" name="values[3].Rating" class="form-control"></textarea>
</div>
</div>
</td>
</tr>
<tr style="background-color: #DDD;">
<th colspan="5" style="font-size: 16px">
Competency: TX(R)2 - Calculates income tax payable & prepares income tax return for a corporation
</th>
</tr>
<tr>
<th></th>
<th style="vertical-align: middle">Tasks to be performed:</th>
<th></th>
<th style="text-align: center; vertical-align: middle">Your Rating</th>
<th style="text-align: center; vertical-align: middle">
A / B
</th>
</tr>
<tr>
<td style="vertical-align: middle">TX(R)2.1</td>
<td style="vertical-align: middle; width: 60%">"Collects and calculates the information needed to file the tax return for a corporation, considering: • type of corporation (for example, private, public, small business corporation, employment, foreign) • inclusion and classification of income (for example, active business income, income from property, capital gains, exemptions) • deductibility of expenses (for example, capital allowances, assessed losses and special allowances) • tax deductions and credits (for example, small business deduction, general tax reduction) • type of corporation (for example, private, public, small business corporation, employment, foreign)</td>
<td></td>
<td style="vertical-align: middle">
<input type="hidden" name="values[4].CompetencySkillId" value="TX(R)2.1">
<input style="text-align: center" min="1" max="4" data-bv-integer="true" data-bv-greaterthan-message="Invalid input" data-bv-greaterthan="true" data-bv-greaterthan-inclusive="false" data-bv-greaterthan-value="0" type="number" name="values[4].Rating" class="form-control">
</td>
<td style="vertical-align: middle">
<input style="text-align: center;" pattern="([ABab])" data-bv-regexp-message="This value must be A or B" type="text" name="values[4].AorB" class="form-control AorB-7">
</td>
</tr>
<tr>
<td style="vertical-align: middle">TX(R)2.2</td>
<td style="vertical-align: middle; width: 60%">Prepares the Income Tax return</td>
<td></td>
<td style="vertical-align: middle">
<input type="hidden" name="values[5].CompetencySkillId" value="TX(R)2.2">
<input style="text-align: center" min="1" max="4" data-bv-integer="true" data-bv-greaterthan-message="Invalid input" data-bv-greaterthan="true" data-bv-greaterthan-inclusive="false" data-bv-greaterthan-value="0" type="number" name="values[5].Rating" class="form-control">
</td>
<td style="vertical-align: middle">
<input style="text-align: center;" pattern="([ABab])" data-bv-regexp-message="This value must be A or B" type="text" name="values[5].AorB" class="form-control AorB-7">
</td>
</tr>
<tr>
<td style="vertical-align: middle">TX(R)2.3</td>
<td style="vertical-align: middle; width: 60%">Calculates secondary tax on companies or equivalent shareholder tax</td>
<td></td>
<td style="vertical-align: middle">
<input type="hidden" name="values[6].CompetencySkillId" value="TX(R)2.3">
<input style="text-align: center" min="1" max="4" data-bv-integer="true" data-bv-greaterthan-message="Invalid input" data-bv-greaterthan="true" data-bv-greaterthan-inclusive="false" data-bv-greaterthan-value="0" type="number" name="values[6].Rating" class="form-control">
</td>
<td style="vertical-align: middle">
<input style="text-align: center;" pattern="([ABab])" data-bv-regexp-message="This value must be A or B" type="text" name="values[6].AorB" class="form-control AorB-7">
</td>
</tr>
<tr>
<td colspan="5">
<div class="form-group">
<label class="col-sm-4 control-label">
Trainee’s reflection on professional skills utilised in demonstrating their competence in the performance of these tasks:
</label>
<div class="col-sm-8">
<input type="hidden" name="values[7].CompetencySkillId-Reflection" value="TX(R)2"><textarea rows="3" name="values[7].Rating" class="form-control"></textarea>
</div>
</div>
</td>
</tr>
<tr>
<td colspan="5">
<div class="form-group">
<label class="col-sm-4 control-label">
Trainee’s comment i.r.o. reviewer’s rating for this competency:
</label>
<div class="col-sm-8">
<input type="hidden" name="values[8].CompetencySkillId-Comment" value="TX(R)2"><textarea rows="3" name="values[8].Rating" class="form-control"></textarea>
</div>
</div>
</td>
</tr>
<tr style="background-color: #DDD;">
<th colspan="5" style="font-size: 16px">
Competency: TX(R)3 - Calculates other taxes payable & prepares appropriate returns
</th>
</tr>
<tr>
<th></th>
<th style="vertical-align: middle">Tasks to be performed:</th>
<th></th>
<th style="text-align: center; vertical-align: middle">Your Rating</th>
<th style="text-align: center; vertical-align: middle">
A / B
</th>
</tr>
<tr>
<td style="vertical-align: middle">TX(R)3.1</td>
<td style="vertical-align: middle; width: 60%">Calculates the appropriate CGT tax payable on qualifying transactions</td>
<td></td>
<td style="vertical-align: middle">
<input type="hidden" name="values[9].CompetencySkillId" value="TX(R)3.1">
<input style="text-align: center" min="1" max="4" data-bv-integer="true" data-bv-greaterthan-message="Invalid input" data-bv-greaterthan="true" data-bv-greaterthan-inclusive="false" data-bv-greaterthan-value="0" type="number" name="values[9].Rating" class="form-control">
</td>
<td style="vertical-align: middle">
<input style="text-align: center;" pattern="([ABab])" data-bv-regexp-message="This value must be A or B" type="text" name="values[9].AorB" class="form-control AorB-7">
</td>
</tr>
<tr>
<td style="vertical-align: middle">TX(R)3.2</td>
<td style="vertical-align: middle; width: 60%">Records indirect taxes (VAT) for transactions in accordance with relevant legislation</td>
<td></td>
<td style="vertical-align: middle">
<input type="hidden" name="values[10].CompetencySkillId" value="TX(R)3.2">
<input style="text-align: center" min="1" max="4" data-bv-integer="true" data-bv-greaterthan-message="Invalid input" data-bv-greaterthan="true" data-bv-greaterthan-inclusive="false" data-bv-greaterthan-value="0" type="number" name="values[10].Rating" class="form-control">
</td>
<td style="vertical-align: middle">
<input style="text-align: center;" pattern="([ABab])" data-bv-regexp-message="This value must be A or B" type="text" name="values[10].AorB" class="form-control AorB-7">
</td>
</tr>
<tr>
<td style="vertical-align: middle">TX(R)3.3</td>
<td style="vertical-align: middle; width: 60%">Prepares the indirect tax (VAT) return</td>
<td></td>
<td style="vertical-align: middle">
<input type="hidden" name="values[11].CompetencySkillId" value="TX(R)3.3">
<input style="text-align: center" min="1" max="4" data-bv-integer="true" data-bv-greaterthan-message="Invalid input" data-bv-greaterthan="true" data-bv-greaterthan-inclusive="false" data-bv-greaterthan-value="0" type="number" name="values[11].Rating" class="form-control">
</td>
<td style="vertical-align: middle">
<input style="text-align: center;" pattern="([ABab])" data-bv-regexp-message="This value must be A or B" type="text" name="values[11].AorB" class="form-control AorB-7">
</td>
</tr>
<tr>
<td colspan="5">
<div class="form-group">
<label class="col-sm-4 control-label">
Trainee’s reflection on professional skills utilised in demonstrating their competence in the performance of these tasks:
</label>
<div class="col-sm-8">
<input type="hidden" name="values[12].CompetencySkillId-Reflection" value="TX(R)3"><textarea rows="3" name="values[12].Rating" class="form-control"></textarea>
</div>
</div>
</td>
</tr>
<tr>
<td colspan="5">
<div class="form-group">
<label class="col-sm-4 control-label">
Trainee’s comment i.r.o. reviewer’s rating for this competency:
</label>
<div class="col-sm-8">
<input type="hidden" name="values[13].CompetencySkillId-Comment" value="TX(R)3"><textarea rows="3" name="values[13].Rating" class="form-control"></textarea>
</div>
</div>
</td>
</tr>
<tr style="background-color: #DDD;">
<th colspan="5" style="font-size: 16px">
Competency: TX(R)4 - Discloses all tax information and computations correctly in the financial statements
</th>
</tr>
<tr>
<th></th>
<th style="vertical-align: middle">Tasks to be performed:</th>
<th></th>
<th style="text-align: center; vertical-align: middle">Your Rating</th>
<th style="text-align: center; vertical-align: middle">
A / B
</th>
</tr>
<tr>
<td style="vertical-align: middle">TX(R)4.1</td>
<td style="vertical-align: middle; width: 60%">Discloses all relevant tax information and amounts in the financial statements of an entity in accordance with guidance provided by the relevant accounting standards</td>
<td></td>
<td style="vertical-align: middle">
<input type="hidden" name="values[14].CompetencySkillId" value="TX(R)4.1">
<input style="text-align: center" min="1" max="4" data-bv-integer="true" data-bv-greaterthan-message="Invalid input" data-bv-greaterthan="true" data-bv-greaterthan-inclusive="false" data-bv-greaterthan-value="0" type="number" name="values[14].Rating" class="form-control">
</td>
<td style="vertical-align: middle">
<input style="text-align: center;" pattern="([ABab])" data-bv-regexp-message="This value must be A or B" type="text" name="values[14].AorB" class="form-control AorB-7">
</td>
</tr>
<tr>
<td style="vertical-align: middle">TX(R)4.2</td>
<td style="vertical-align: middle; width: 60%">Calculates and correctly discloses deferred tax in an entity’s financial statements</td>
<td></td>
<td style="vertical-align: middle">
<input type="hidden" name="values[15].CompetencySkillId" value="TX(R)4.2">
<input style="text-align: center" min="1" max="4" data-bv-integer="true" data-bv-greaterthan-message="Invalid input" data-bv-greaterthan="true" data-bv-greaterthan-inclusive="false" data-bv-greaterthan-value="0" type="number" name="values[15].Rating" class="form-control">
</td>
<td style="vertical-align: middle">
<input style="text-align: center;" pattern="([ABab])" data-bv-regexp-message="This value must be A or B" type="text" name="values[15].AorB" class="form-control AorB-7">
</td>
</tr>
<tr>
<td colspan="5">
<div class="form-group">
<label class="col-sm-4 control-label">
Trainee’s reflection on professional skills utilised in demonstrating their competence in the performance of these tasks:
</label>
<div class="col-sm-8">
<input type="hidden" name="values[16].CompetencySkillId-Reflection" value="TX(R)4"><textarea rows="3" name="values[16].Rating" class="form-control"></textarea>
</div>
</div>
</td>
</tr>
<tr>
<td colspan="5">
<div class="form-group">
<label class="col-sm-4 control-label">
Trainee’s comment i.r.o. reviewer’s rating for this competency:
</label>
<div class="col-sm-8">
<input type="hidden" name="values[17].CompetencySkillId-Comment" value="TX(R)4"><textarea rows="3" name="values[17].Rating" class="form-control"></textarea>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
</div>
</div>
</div>
最佳答案
您已将 data-toggle
应用于面板。像这样:
<div class="panel panel-default" data-toggle="collapse" data-target="#collapse-7">
尝试将它仅应用于标题:
<div class="panel panel-default"> // Removed attributes.
<div class="panel-heading" data-toggle="collapse" data-target="#collapse-7">
这似乎可以解决问题!
关于javascript - 防止 Bootstrap 3 Accordion 的奇怪行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27237633/
我有这种来自 Google map 自动完成的奇怪行为(或者我可能错过了某事)...想法?奇怪的: 您在输入中输入某物,例如“伦敦” 您按 [ENTER] 你按下 [CLEAR] 按钮 你点击进入'输
这段代码与《Learning Java》(Oracle Press Books)一书中的代码完全一样,但它不起作用。我不明白为什么它不起作用,它应该起作用。我用 OpenJDK 和 Sun JDK 7
示例 1 中究竟发生了什么?这是如何解析的? # doesnt split on , [String]::Join(",",("aaaaa,aaaaa,aaaaa,aaaaa,aaaaa,aa
我需要获得方程式系统的解决方案。为此,我使用函数sgesv_()。 一切都很好,它使我感到解决方案的正确结果。 但是我得到一个奇怪的警告。 警告:从不兼容的指针类型传递'sgesv_'的参数3 我正在
我目前在制作动画时遇到一个奇怪的问题: [UIView animateWithDuration:3 delay:0
alert('works'); $(window).load(function () { alert('does not work'); });
我的代码: public class MyTest { public class StringSorter implements Comparator { public
我正在学习 JavaScript。尝试理解代码, function foo (){ var a = b = {name: 'Hai'}; document.write(a.name +''
这个问题不太可能帮助任何 future 的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况有关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visit
这按预期工作: [dgorur@ted ~]$ env -i env [dgorur@ted ~]$ 这样做: [dgorur@ted ~]$ env -i which date which: no
struct BLA { int size_; int size()const{ return size_; } } int x; BLA b[ 2 ]; BLA * p = &b[
我有以下代码: #test img {vertical-align: middle;} div#test { border: 1px solid green; height: 150px; li
我想大多数使用过 C/C++ 的人都对预处理器的工作原理有一定的直觉(或多或少)。直到今天我也是这么认为的,但事实证明我的直觉是错误的。故事是这样的: 今天我尝试了一些东西,但我无法解释结果。首先考虑
我想为 TnSettings 做 mock,是的,如果通过以下方法编写代码,它就可以工作,问题是我们需要为每个案例编写 mock 代码,如果我们只 mock 一次然后执行多个案例,那么第二个将报告异常
我的项目中有以下两个结构 typedef volatile struct { unsigned char rx_buf[MAX_UART_BUF]; //Input buffer over U
Regex rx = new Regex(@"[+-]"); string[] substrings = rx.Split(expression); expression = "-9a3dcb
我的两个应用程序遇到了一个奇怪的问题。这是设置: 两个 tomcat/java 应用程序,在同一个网络中运行,连接到相同的 MS-SQL-Server。一个应用程序,恰好按顺序位于 DMZ 中可从互联
我目前正在与 Android Api Lvl 8 上的 OnLongClickListener 作斗争。 拿这段代码: this.webView.setOnLongClickListener(new
这个问题不太可能帮助任何 future 的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况相关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visit
只是遇到了奇怪的事情。我有以下代码: -(void)ImageDownloadCompleat { [self performSelectorOnMainThread:@selector(up
我是一名优秀的程序员,十分优秀!