我嘗試將鏈接樣式化爲JQuery UI按鈕時出現了一個奇怪的問題。它在Chrome中顯示爲按鈕,在Firefox和IE8中顯示爲鏈接。JQuery UI標籤不作爲Firefox和IE中的按鈕樣式
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="script/jquery-1.4.2.js"></script>
<script type="text/javascript" src="script/jquery-ui-1.8.9.custom.min.js"></script>
<link rel="stylesheet" type="test/css" href="stylesheet/jquery-ui-1.8.9.custom.css">
<link rel="stylesheet" type="text/css" href="stylesheet/styles.css">
<script type="text/javascript">
$(document).ready(function(){
$("a").button();
});
</script>
<title>Introduction</title>
</head>
<body class="indexbody">
<div class="indexwrapper">
<div id="introduction">
<div class="btn">
<a href="test.html" >link</a>
</div>
</div>
</div>
</body>
</html>
Firebug有什麼結果?你看到的UI值設置類屬性?你試過什麼了?在湯姆克魯斯的名言中,「幫助我幫助你」。 – jmort253 2011-01-31 03:53:52
Firefox:class =「ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only」Chrome:class =「ui-button」ui-widget「ui-state-default」「ui-corner」 -all ui-button-text-only「 生成的HTML在Firefox和Chrome中完全相同。在IE中沒有應用ui-類。 – 2011-01-31 03:56:33
在Chrome中,我看到一個綠色按鈕(如預期的那樣)。在Firefox和IE中我看到一個鏈接。 – 2011-01-31 04:05:20