【发布时间】:2013-11-20 19:34:59
【问题描述】:
在这个Fiddle 中,我试图显示/隐藏包含基于复选框选择的文件输入的表格行。但是 showHide 函数没有被调用。
<div align="center" class="divBody">
<br />
<div id="controlHost">
<div id="outerPanel">
<table width="100%" cellpadding="2" cellspacing="5">
<tr align="left">
<td colspan="2">
<input type="checkbox" id="c1" onclick="showHide()">only Textbox</input>
</td>
</tr>
<tr align="left" id="fileLabel">
<td colspan="2">
<span class="message" >Select file</span>
</td>
</tr>
<tr align="left" id="fileBox">
<td valign="top" style="height:100%; width:70%;">
<input type="file" id="FileInput" multiple="false" class="fileInput" style="height:100%; width:100%;"/>
</td>
</tr>
<tr align="left">
<td colspan="2">
<span class="message" >Types</span>
</td>
</tr>
<tr>
<td>
<input type="text" id="txtTypes" tabindex="0" style="margin-left:1px;width:100%" maxlength="50" >
</td>
</tr>
<tr>
<td align="center">
<input type="button" id="upload" name="Upload" value="Update" onclick="startUpload('FileInput', 1048576, 'uploadProgress', 'statusMessage', 'upload', 'cancel');"
class="button" />
<input type="button" id="cancel" name="Cancel" value="Cancel" disabled="disabled"
onclick="cancelUpload();" class="button" />
</td>
</tr>
</table>
</div>
</div>
【问题讨论】:
-
可能有问题。但是,如果我在本地 vs 上运行相同的代码,那么它可以正常工作。
标签: javascript jquery html