我有一个表单,由于某种原因,我不能“点击”某些字段,虽然我可以通过它们进行选项卡。这种行为并不总是存在,因为我正在构建(有点复杂)的形式,但它现在已经悄悄进入,我不知道该寻找什么来排除故障。
有人能告诉我哪些条件会使表单字段无法选择?
编辑 - 人们已经要求代码,所以在这里。 (虽然我认为有一个可能的麻烦制造者列表/为后代进行故障排除会很好...)
因此,我现在在浏览器中显示这一点,我无法点击任何过去的“灵感”。我知道我在UL里面有一个UL,但它在LI里面,所以我读过,这是有效的。即使它不是它应该只影响验证,对吗?这种“冻结”的事情似乎很奇怪。
<form name="thumbnail" id="signup-form" action="<?php echo $_SERVER["PHP_SELF"];?>" method="post">
<input type="hidden" name="x1" value="" id="x1" />
<input type="hidden" name="y1" value="" id="y1" />
<input type="hidden" name="x2" value="" id="x2" />
<input type="hidden" name="y2" value="" id="y2" />
<input type="hidden" name="w" value="" id="w" />
<input type="hidden" name="h" value="" id="h" />
<fieldset class="password">
<legend>Please Choose a password so you can access your profile in the future</legend>
<div class="row">
<label for="password1">Password</label>
<input type="password" size="20" id="password1" name="password1" class="required"/>
<div id="passwordStrengthDiv" class="is0"></div></div>
<div class="row"><label for="password2">Password Again</label>
<input type="password" size="20" id="password2" name="password2" class="required"/></div>
</fieldset>
<fieldset class="basicInfo">
<legend>Basic Info </legend>
<ul>
<li><label for="firstName">First Name</label><input type="text" size="20" id="firstName" name="firstName" value="" class="required"/></li>
<li><label for="lastName">Last Name</label><input type="text" size="20" id="lastName" name="lastName" value="" class="required"/></li>
</ul>
</fieldset><!-- close basicInfo -->
<div class="margin-div"><textarea cols="40" rows="5" name="desc_short" class="required">Short description</textarea></div>
<fieldset class="moreInfo">
<legend>More Info</legend>
<li><label for="nationality">Nationality</label><input type="text" size="20" id="nationality" name="nationality" class="required"/></li>
<li><label for="speakEnglish">I speak english</label><input type="checkbox" id="speakEnglish" name="speakEnglish" value="1" /></li>
<li><label for="speakGerman">I speak german</label><input type="checkbox" id="speakGerman" name="speakGerman" value="1" /></li>
<fieldset class="instrument">
<legend>What is your main Instrument?</legend>
<div class="margin-div">
<input type="radio" name="mainInst" value="voice" /> Voice
<input type="radio" name="mainInst" value="guitar" /> Guitar
<input type="radio" name="mainInst" value="keys" /> Keys
<input type="radio" name="mainInst" value="bass" /> Bass
<input type="radio" name="mainInst" value="sax" /> Sax<br/>
<input type="radio" name="mainInst" value="trumpet" /> Trumpet
<input type="radio" name="mainInst" value="percussion" /> Percussion
<input type="radio" name="mainInst" value="flute" /> Flute
<input type="radio" name="mainInst" value="other" /> Other
</div>
</fieldset>
<fieldset class="inspiration">
<legend>Inspiration (list up to 5 musicians that inspire you)</legend>
<ul>
<li><label for="inspiration">Inspration</label>
<ul>
<li><input type="text" id="inspiration" name="inspiration1" /></li>
<li><input type="text" id="inspiration" name="inspiration2" /></li>
<li><input type="text" id="inspiration" name="inspiration3" /></li>
<li><input type="text" id="inspiration" name="inspiration4" /></li>
<li><input type="text" id="inspiration" name="inspiration5" /></li></ul>
</li>
</ul>
</fieldset>
<div class="margin-div"><textarea cols="40" rows="5" name="desc_long" class="required">Longer description</textarea></div>
</fieldset><!-- /fieldset moreinfo -->
<fieldset class="otherInfo">
<legend>Other Info</legend>
<fieldset class="links">
<legend>More of me - If you would like we can include up to 3 links where people can see or hear more of you</legend>
<ul>
<li><label for="link1name">Name of Link 1</label><input type="text" id="link1name" name="link1name" value="Name of Link ( ex: My Band on Youtubr )" /></li>
<li><label for="link1url">URL of Link 1</label><input type="text" id="link1url" name="link1url" value="URL of Link ( ex: www.youtube.com?feature=dddkshue )"/></li>
<li><label for="link2name">Name of Link 2</label><input type="text" id="link2name" name="link2name" /></li>
<li><label for="link2url">URL of Link 2</label><input type="text" id="link2url" name="link2url" /></li>
<li><label for="link3name">Name of Link 3</label><input type="text" id="link3name" name="link3name" /></li>
<li><label for="link3url">URL of Link 1</label><input type="text" id="link3url" name="link3url" /></li>
</ul>
</fieldset>
<fieldset class="other">
<legend>Other Information</legend>
<ul>
<li><label for="proExperience">Would you consider yourself a professional musician?</label><input type="checkbox" id="proExperience" name="proExperience" value="1" /></li>
<li><label for="haveStudio">Do you have your own recording facilities?</label><input type="checkbox" id="haveStudio" name="haveStudio" value="1" /></li>
<li><label for="musicTheory">Do you know music theory?</label><input type="checkbox" id="musicTheory" name="musicTheory" value="1" /></li>
<li><label for="composer">Do you write your own music?</label><input type="checkbox" id="composer" name="composer" value="1" /></li>
<li><label for="teacher">Do you teach?</label><input type="checkbox" id="teacher" name="teacher" value="1" /></li>
</ul>
</fieldset>
<fieldset class="contact">
<legend>Contact Information</legend>
<span><label for="email">Email Address</label><input type="text" id="email" name="email" /></span>
</fieldset>
</fieldset> <!-- /more info -->
<input type="hidden" name="thumb_image_location" value="<?php echo $thumb_image_location ?>" id="thumb_image_location" />
<input type="hidden" name="large_image_location" value="<?php echo $large_image_location ?>" id="large_image_location" />
<input type="submit" name="upload_thumbnail" value="Save Info" id="save_thumb" />
</form>
答案 0 :(得分:1)
可能是你的字段有<div>
,但是z-index不同。这会阻止您访问<div>
答案 1 :(得分:0)
也可能是你有残疾=&#34;禁用&#34;表单字段上的属性。
代码示例非常有用。
答案 2 :(得分:0)
我最近遇到了同样的问题......那是因为我有浮动的表单元素,这导致它们在我点击它们时超出了包含div的范围。
从Keeping an floated image inside the div with CSS获取解决方案解决了我的问题,并可能会解决您的问题。简而言之:使用溢出:隐藏在包含div中。