HTML中的兼容性问题

时间:2014-08-12 17:42:49

标签: html

我的html代码存在兼容性问题,唯一可用的浏览器是konquo​​rer,它附带了redhat Linux。

chrome,firefox和IE(旧版本工作)等浏览器会有奇怪的选择/选项表。

<html>
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
        <TITLE>StripCal Python Wrapper</TITLE>
    </head>


    <style type="text/css">
        .container{
            width: 500px;
            clear: both;
        }
        .container input{
            width: 500px;
            clear: both;
        }
    </style>


    <body>
    <p>
        Input StripCal Field Inputs:
    </p>

    <p>
        <form action="StripCalPythonRun.py" method="post">


                <TABLE BORDER=1>
                <TR>
                    <TD> Configuration of the trace(s): </TD>
                    <TD> The Trace is Composed of: </TD>
                    <TD> Dimensions are in: </TD>
                    <TD> Output SPice Format: </TD>
                    <TD> When Ready: </TD>
                </TR>
                <TR>
                    <TD>
                    <CENTER>
                    <select name="config" size=10>
                            <option value="1" selected="selected">One_Stripline</option>
                            <option value="2">One_Microstrip</option>
                            <option value="3">Two_Stripline</option>
                            <option value="4">Two_Stripline_Pairs</option>
                            <option value="5">Two_Microstrip</option>
                            <option value="6">Two_Microstrip_Pairs</option>
                            <option value="7">Stripline_Array</option>
                            <option value="8">Stripline_Pair_Array</option>
                            <option value="9">Microstrip_Array</option>
                            <option value="10">Microstrip_Pair_Array</option>
                        </select>
                    </CENTER>
                    </TD>
                <TD>
                <CENTER>
                    <select name="COND" size=10>
                        <option value="Bulk_Copper" selected="selected">Bulk_Copper</option>
                        <option value="Plated_Copper">Plated_Copper</option>
                        <option value="Sputtered_Copper">Sputtered_Copper</option>
                        <option value="Tungsten">Tungsten</option>
                        <option value="Aluminum">Aluminum</option>
                        <option value="Nickel">Nickel</option>
                        <option value="Cofired_Tungsten">Cofired_Tungsten</option>
                        <option value="IBM_Moly">IBM_Moly</option>
                        <option value="Gold">Gold</option>
                        <option value="Other">Other</option>
                    </select>
                </CENTER>
                </TD>

                <TD>
                <CENTER>
                    <select name="dimen" size=2>
                        <option value="MILS">MILS</option>
                        <option value="uM" selected="selected">Microns</option>
                    </select>
                </CENTER>
                </TD>

                <TD>
                <CENTER>
                    <select name="spicever" size=3>
                        <option value="HPSPICE">HPSPICE</option>
                        <option value="HSPICE" selected="selected">HSPICE</option>
                        <option value="SPECTRE">SPECTRE</option>
                    </select>
                </CENTER>
                </TD>

                <TD>
                <CENTER>
                    <input type="hidden" name="Input_Type" value="list">
                    <input type="submit" value="Compute">
                </CENTER>
                </TD>

                </TR>
                </TABLE>

                <TABLE BORDER=1>
                    <TR>
                        <TD> Subcircuit path: </TD>
                        <TD> <input type="text" name="SBCKPATH" value="tmp1"> </TD>
                        <TD> Transmission line call name: </TD>
                        <TD> <input type="text" name="TLNAME" value="test1"> </TD>
                    </TR>
                </TABLE>

                <TABLE BORDER=1>
                    <TR>
                        <TD> Trace width: </TD>
                        <TD> <input type="text" name="W9" value="24"> </TD>
                        <TD> Dielectric thickness ABOVE trace: </TD>
                        <TD> <input type="text" name="B19" value="33"> </TD>
                    </TR>

                    <TR>
                        <TD> Trace Length (in in/cm): </TD>
                        <TD> <input type="text" name="length" value="1"> </TD>
                        <TD> Dielectric Thickness BELOW trace: </TD>
                        <TD> <input type="text" name="B29" value="33"> </TD>
                    </TR>

                    <TR>
                        <TD> Trace Thickness: </TD>
                        <TD> <input type="text" name="T9" value="15"> </TD>
                        <TD> Gap Between Adjacent Traces: </TD>
                        <TD> <input type="text" name="GAP9" value="1000"> </TD>
                    </TR>

                    <TR>
                        <TD> Resistivity ("Rho") (Ohm-meter): </TD>
                        <TD> <input type="text" name="rho"> </TD>
                        <TD> Gap Between Adjacent Pairs: </TD>
                        <TD> <input type="text" name="GAP99" value="1000"> </TD>
                    </TR>

                    <TR>
                        <TD> Dielectric Loss Tangent: </TD>
                        <TD> <input type="text" name="delta" value="0.01"> </TD>
                        <TD> Dielectric's Relative Permittivity ("er"): </TD>
                        <TD> <input type="text" name="Er" value="3.35"> </TD>
                    </TR>
                </TABLE>
            </form>

其他页面:

    <html>
        <head>
            <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
            <TITLE>StripCal Python Wrapper</TITLE>
        </head>


        <style type="text/css">
            .container{
                width: 500px;
                clear: both;
            }
            .container input{
                width: 500px;
                clear: both;
            }
        </style>


        <body>
        <p>
            Input StripCal Field Inputs:
        </p>

        <p>
            <form action="StripCalPythonRun.py" method="post">


                    <TABLE BORDER=1>
                    <TR>
                        <TD> Configuration of the trace(s): </TD>
                        <TD> The Trace is Composed of: </TD>
                        <TD> Dimensions are in: </TD>
                        <TD> Output Spice Format: </TD>
                        <TD> When Ready: </TD>
                    </TR>
                    <TR>
                        <TD>
                        <CENTER>

                            <select name="config" size=10 >
                            <option value="1" selected="selected">One_Stripline</option>
                            <option value="2">One_Microstrip</option>
                            <option value="3">Two_Stripline</option>
                            <option value="4">Two_Stripline_Pairs</option>
                            <option value="5">Two_Microstrip</option>
                            <option value="6">Two_Microstrip_Pairs</option>
                            <option value="7">Stripline_Array</option>
                            <option value="8">Stripline_Pair_Array</option>
                            <option value="9">Microstrip_Array</option>
                            <option value="10">Microstrip_Pair_Array</option>
                        </select>


                        </CENTER>
                        </TD>
                    <TD>
                    <CENTER>

                        <select name="COND" size=10>
                        <select name="COND" size=10>
                            <option value="Bulk_Copper" selected="selected">Bulk_Copper</option>
                            <option value="Plated_Copper">Plated_Copper</option>
                            <option value="Sputtered_Copper">Sputtered_Copper</option>
                            <option value="Tungsten">Tungsten</option>
                            <option value="Aluminum">Aluminum</option>
                            <option value="Nickel">Nickel</option>
                            <option value="Cofired_Tungsten">Cofired_Tungsten</option>
                            <option value="IBM_Moly">IBM_Moly</option>
                            <option value="Gold">Gold</option>
                            <option value="Other">Other</option>
                        </select>


                    </CENTER>
                    </TD>

                    <TD>
                    <CENTER>

                        <select name="dimen" size=2>
                        <select name="dimen" size=2>
                            <option value="MILS">MILS</option>
                            <option value="uM" selected="selected">Microns</option>
                        </select>


                    </CENTER>
                    </TD>

                    <TD>
                    <CENTER>

                        <select name="spicever" size=3>
                        <select name="spicever" size=3>
                            <option value="HPSPICE">HPSPICE</option>
                            <option value="HSPICE" selected="selected">HSPICE</option>
                            <option value="SPECTRE">SPECTRE</option>
                        </select>


                    </CENTER>
                    </TD>

                    <TD>
                    <CENTER>

                    <input type="hidden" name="Input_Type" value="list">
                    <input type="submit" value="Compute">


                    </CENTER>
                    </TD>

                    </TR>
                    </TABLE>


                    <TABLE BORDER=1>
                        <TR>


                            <TD> Subcircuit path </TD>
                            <TD> <input type="text" name="SBCKPATH" value=tmp1></TD>
                            <TD> Transmission line call name </TD>
                            <TD> <input type="text" name="TLNAME" value=test1></TD>

                        </TR>
                    </TABLE>


                    <TABLE BORDER=1>
                        <TR>


                            <TD> Trace width: </TD>
                            <TD> <input type="text" name="W9" value=24></TD>

                            <TD> Dielectric thickness ABOVE trace: </TD>
                            <TD> <input type="text" name="B19" value=33></TD>

                        </TR>

                        <TR>


                            <TD> Trace Length (in in/cm): </TD>
                            <TD> <input type="text" name="length" value=1></TD>

                            <TD> Dielectric Thickness BELOW trace: </TD>
                            <TD> <input type="text" name="B29" value=33></TD>

                        </TR>

                        <TR>


                            <TD> Trace Thickness: </TD>
                            <TD> <input type="text" name="T9" value=15></TD>

                            <TD> Gap Between Adjacent Traces: </TD>
                            <TD> <input type="text" name="GAP9" value=1000></TD>

                        </TR>

                        <TR>


                            <TD> Resistivity ("Rho") (Ohm-meter): </TD>
                            <TD> <input type="text" name="rho" value=rho_empty></TD>

                            <TD> Gap Between Adjacent Pairs: </TD>
                            <TD> <input type="text" name="GAP99" value=1000></TD>

                        </TR>

                        <TR>


                            <TD> Dielectric Loss Tangent: </TD>
                            <TD> <input type="text" name="delta" value=0.01></TD>

                            <TD> Dielectric's Relative Permittivity("er"): </TD>
                            <TD> <input type="text" name="Er" value=3.35></TD>

                        </TR>
                    </TABLE>
                </form>

</body>
</html>

如果我查看此代码并按下compute(转到另一个具有相同表格的页面),则选择选项会搞砸。

原始表: enter image description here 单击“计算”后的表: enter image description here

我也尝试设置内容来模拟IE7,但它并没有解决问题。有人知道为什么会这样吗?

编辑: - 添加了关闭/ Html标记 - 添加了开放体和关闭体

尝试删除中心标记但是,它无法正常工作

1 个答案:

答案 0 :(得分:2)

如果您在发布的第二个页面上查看代码,则有3个不同的选择字段具有重复的<select>标记,可以打开选择表单标记两次。以下是您发布的代码片段:

<select name="spicever"  size=3>
<select name="spicever" size=3>
                            <option value="HPSPICE">HPSPICE</option>
                            <option value="HSPICE" selected="selected">HSPICE</option>
                            <option value="SPECTRE">SPECTRE</option>
</select>

我建议您删除重复的代码,它应该正确显示。