English 中文(简体)
广播盒不重新设定为“检查”级
原标题:Radio Boxes not resetting to "checked" status in Firefox

我的电台盒式表为什么在7.0.1中工作,但却在IE、Khat和Safari做罚款。 问题是,“检查”的无线电箱对超文本显示的情况进行n击。

例如,如果我把温度的设定从“f”改为“c”和“c”和“新闻选择”,那么行动文字就看到正确的数值。 当时,我还在FF中报到,并更新窗户,“c”仍然选定。 如所述,在其他浏览器中,而不是在FF中,这种工程是预期的。

我有很强的时间认为,这一基本内容在FF中被打破,但超文本是直截了当的。

-- Geoff

    <form name="form1" method="POST" action="weather_uom_set.php">        
    <h3>Precipitation</h3>
    <input type="radio" name="precip" value="in" checked="checked"/> Inches (")<br/>
    <input type="radio" name="precip" value="mm" /> Millimeters (mm)<br/>
    <h3>Temperature</h3>
    <input type="radio" name="temp" value="f" checked="checked"/> Fahrenheit (&deg;f)<br/>
    <input type="radio" name="temp" value="c" /> Celsius (&deg;c)<br/>
    <input type="submit" value="Submit" />
    </form>
问题回答

这或许是因为“......”铭记以前的形式呈报价值,这种价值可以推翻你在超文本中确定的任何缺省选择。 而且,即使你在此指出,我也谨指出,Javascript也可以超越违约的超文本行为,这样,如果你有文字操作,就会确保它也是确定/消除违约价值的避风港。

是的:

我最初把在“无”箱子上安装检查仪,而不是在“有”箱子上安装检查仪“真实”。

然而,您可能认为,我也有一个类似的固定点,以确保你在页数时得到你想要的价值:

<input type="radio" name="mybox" id="mybox_yes" value="1">
<input type="radio" name="mybox" id="mybox_no" checked="checked" value="0">

<script>

    var mybox = 0; // value 1 or 0 inserted with server side script

    if(mybox == 1){
        var fix_checkbox = function(){
            document.getElementById("mybox_yes").checked=true;
        };
    }
    else
    {
        var fix_checkbox = function(){
        document.getElementById("mybox_no").checked=true;
        };
    }

    setTimeout(fix_checkbox,1000);

</script>

逻辑服务器方面做得更好,只有产出你想要的线子:

<script>
    setTimeout(function(){document.getElementById("mybox_no").checked=true;},1000);
</script>




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签