Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 什么可以构成表单字段;“不可聚焦”吗;?_Html_Forms - Fatal编程技术网

Html 什么可以构成表单字段;“不可聚焦”吗;?

Html 什么可以构成表单字段;“不可聚焦”吗;?,html,forms,Html,Forms,我有一个表单,由于某种原因,我无法“点击”某些字段,尽管我可以通过选项卡查看它们。在我构建(有些复杂)表单时,这种行为并不总是存在,但现在它已经悄悄出现了,我不确定要寻找什么来进行故障排除 有人能告诉我什么情况会使表单字段不可选择吗 编辑-人们要求提供代码,所以它就在这里。(虽然我认为为后代列出可能的麻烦制造者/故障排除列表会很好…) 所以现在我的浏览器里有这个,我不能点击任何超过“灵感”的东西。我知道我有一个UL在一个UL里面,但它在一个LI里面,正如我读到的,这是有效的。即使不是,也只会影响

我有一个表单,由于某种原因,我无法“点击”某些字段,尽管我可以通过选项卡查看它们。在我构建(有些复杂)表单时,这种行为并不总是存在,但现在它已经悄悄出现了,我不确定要寻找什么来进行故障排除

有人能告诉我什么情况会使表单字段不可选择吗

编辑-人们要求提供代码,所以它就在这里。(虽然我认为为后代列出可能的麻烦制造者/故障排除列表会很好…)

所以现在我的浏览器里有这个,我不能点击任何超过“灵感”的东西。我知道我有一个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>

可能是一个
延伸到您的字段,但具有不同的z索引。这将阻止您访问

下的字段,也可能是表单字段上有一个disabled=“disabled”属性


代码示例将非常有用

我最近也有同样的问题。。。这是因为我的表单元素是浮动的,这导致当我点击它们时它们超出了包含div的范围


从中获得解决方案可以解决我的问题,也可以解决你的问题。简而言之:使用overflow:隐藏在您的包含div中。

很可能是这样的。如果您有Chrome或Safari(或Firefox中安装的Firebug),请尝试右键单击其中一个输入并“检查元素”,然后查看实际存在的元素。