0
我正在嘗試使用jQuery模板生成jQuery垂直製表符。我使用此代碼:jQuery,IE上的相對url
<script type="text/javascript">
$(document).ready(function() {
var clientData = [
{ name: "Rey Bango", age: 42, id: 1, phone: ["954-600-1234", "954-355-5555"] },
{ name: "Mark Goldberg", age: 51, id: 2, phone: ["954-600-1234", "954-355-5555"] },
{ name: "Jen Statford", age: "25", id: 3, phone: ["954-600-1234", "954-355-5555"] }
];
$("#clientTemplate").tmpl(clientData).appendTo($("#vtabs div ul"));
$("#phoneTemplate").tmpl(clientData).appendTo($("#vtabs div:last"));
$("#vtabs").jVertTabs();
});
</script>
<script id="clientTemplate" type="text/html">
<li><a href="#${id}">${name}</a></li>
</script>
<script id="phoneTemplate" type="text/html">
<div id="${id}">
<p>${name} - Age: ${age}</p>
<p>Some text on panel 1</p>
</div>
</script>
一切工作在Firefox,Chrome瀏覽器,Opera和Safari,但在IE瀏覽器此代碼不起作用。當我看着html源代碼,我看到,在IE瀏覽器,而不是
我得到
<li><a href="http://localhost:51592/galeria-lista/#1">${name}</a></li>
<li><a href="http://localhost:51592/galeria-lista/#2">${name}</a></li>
<li><a href="http://localhost:51592/galeria-lista/#3">${name}</a></li>
因爲這個jQuery的垂直選項卡不工作在IE中。
請幫幫我。
您正在使用asp.net?如果是的話,這是在用戶控制? – Victor 2011-02-09 01:48:46