开发者

An html input box isn't being displayed, Firebug says it has style="display: none" but I haven't done this

开发者 https://www.devze.com 2022-12-29 16:56 出处:网络
I have placed a form on a page which looks like this: <form id=\"editClassList\" name=\"editClassList\" method=\"get\" action=\"EditClassList\">

I have placed a form on a page which looks like this:

<form id="editClassList" name="editClassList" method="get" action="EditClassList">
    <label>
        <input name="class-to-add" id="class-to-add" size="42" type="text">
    </label>
    <label>
        <input name="save-class-btn" id="save-class-btn" value="Save Class(es)" type="submit">
    </label>
</form>

But when it get's rendered by a browser it comes out like this:

<form id="edit开发者_开发技巧ClassList" name="editClassList" method="get" action="EditClassList">
    <label>
        <input style="display: none;" name="class-to-add" id="class-to-add" size="42" type="text">
    </label>
    <label>
        <input name="save-class-btn" id="save-class-btn" value="Save Class(es)" type="submit">
    </label>
</form>

For some reason style="display: none;" is being added, and I cann't understand why. This results in the text box not displaying.


It sounds like you might have some javascript code that is adding the display:none; tag after the page loads. (Or You could have that in the CSS, but I don't think Firebug would show that in the DOM inspector)

0

精彩评论

暂无评论...
验证码 换一张
取 消