1

Firefox で jQuery からスタイル属性を取得できません。

私のファイル...

<html>
<head>
<script type="text/javascript" src="jquery-1.10.1.js"></script>
</head>
<body>

<script type="text/javascript">
function search() {
alert($("#namesearch").css("border-style"));
}
</script>


<input style="border-style:solid" id="namesearch">
<input type=button onclick="search();" value="Search">
</body>
</html>

Chrome 27.0.1453.116 m と Internet Explorer 8 で、「ソリッド」というアラートが表示されます。

Firefox 22 では、空白のアラートが表示されます。

4

0 に答える 0