IE9 CSS黑客不起作用

时间:2016-09-23 10:25:38

标签: css internet-explorer internet-explorer-9

我正在尝试仅为IE9应用一些css属性 这是我的css代码:

<select id="price-from" onchange="setPrice()">
    <option selected value="500">£500</option>
    <option value="1000">£1000</option>
    <option value="2000">...</option>
</select>
<p id="to">To</p>
<select id="price-to" onchange="setPrice()">
    <option value="8000">...</option>
    <option value="10000">£10,000</option>
    <option selected value="20000">£20,000</option>
</select>

另外,我试着这样做:

function setPrice() {
    var minField = document.getElementById('price-from'),
        maxField = document.getElementById('price-to');

    var min = minField.options[minField.selectedIndex].value,
        max = maxField.options[maxField.selectedIndex].value;

    // We make sure we have both values and that max is greater than min
    if (min == "" || max == "" || parseInt(max) < parseInt(min)) {
        document.getElementById("section1").innerHTML = "<p>No Results</p>";
        return;
        alert("error 1");
    } else { 
        if (window.XMLHttpRequest) {
            // code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp = new XMLHttpRequest();
        } else {
            // code for IE6, IE5
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange = function() {
            if (this.readyState == 4 && this.status == 200) {
                document.getElementById("section1").innerHTML = this.responseText;
            }
        };

    // Don't forget the '&' to separate the two URL parameters
    xmlhttp.open("GET","priceQuery.php?min=" + min + "&max=" + max, true);
    xmlhttp.send();
    }
}

并且像这样:

:root ul li.open,
:root ul li.closed {
    list-style-position: outside \0/IE9;
    float:right \0/IE9;
    width:calc(100% - 20px) \0/IE9;

}

我错过了什么?

0 个答案:

没有答案
相关问题