开发者

Stop Checkbox to be selected when form loads

I have a simple form that has a checkbox. THe checkbox always appears checked when the page loads. How do I make it appear without a check when the page loads?

Here is my code:

                <div id="quote_inputCH" style="width: 110px">
                <div id="input_wrap">
                    <input id="checkpoints" class="styled" type="checkbox"></div>
                <label for="checkpoints">
                <div id="checkboxTITLE"&g开发者_运维知识库t;
                    Checkpoints</div>
                </label></div>


Change the type to an asp:checkbox or add runat=server. Then, in your code behind, check to see whether or not it is the first page load (ie not a postback) and set checked = false.


A script is checking your checkbox. What scripts are running on that page?


Are you using Firefox (not sure about the other browsers). FF will remember field that are filled (including checkboxes) even if you only do a refresh. You must do a hard refresh (shift-F5) to clear the checkbox.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜