我在一個頁面上有兩個腳本,我一次只能得到一個腳本。我不是很熟悉使用JavaScript,所以我希望這是一個簡單的修復。在試圖尋找答案後,我決定最好只是問問題並將代碼放好。2個不同的Javascript - 一次只能工作1個
讚賞任何建設性的意見和答案。謝謝。
預先感謝您。
<head>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
</head>
<body>
<script>
$(function() {
$("#tabs").tabs({
collapsible: true
});
});
</script>
<div id="tabs">
<ul>
<li><a href="#tabs-1">Tab 1</a>
</li>
<li><a href="#tabs-2">Tab 2</a>
</li>
<li><a href="#tabs-3">Tab 3</a>
</li>
</ul>
<div id="tabs-1">
<p><strong>Click this tab again to close the content pane.</strong>
</p>
<p>Content 1</p>
</div>
<div id="tabs-2">
<p><strong>Click this tab again to close the content pane.</strong>
</p>
<p>Content2</p>
</div>
<div id="tabs-3">
<p><strong>Click this tab again to close the content pane.</strong>
</p>
<p>Content 3</p>
</div>
</div>
<script language="javascript" type="text/javascript">
document.write('<script language="javascript" src="http://www.example.com/test.js"><\/script>');
</script>
</body>
爲什麼你的'
'不在''元素之外? – Blender我沒有複製整個源代碼...我的不好 – NotJay
我的意思是body而不是html,我會修復它。 – NotJay