<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="JScript2.js" type="text/javascript"></script>
<script src="JScript.js" type="text/javascript"></script>
<title></title>
</head>
<body >
<div ><input type=text id="uxTextBox" /></div>
</body>
</html>
和2這樣
/// <reference path="JScript.js"/>
/// <reference path="jquery-1.3.2-vsdoc.js"/>
/// <reference path="jquery-1.3.2.js" />
$(document).ready(function() {
referral.PopulateTextBox();
}
第一的=====端的JavaScript文件的HTML頁面========= =文件
/// <reference path="jquery-1.3.2-vsdoc.js"/>
/// <reference path="jquery-1.3.2.js" />
var referral = new Referral();
$(document).ready(function() {
function Referral() {
this.PopulateTextBox = function() {
$("#uxTextBox").text("some text");
}
}
}
的問題是,無論是2個jQuery的文件似乎執行。我試圖填充從另一個js文件的調用對象,然後將值返回到HTML文件
任何想法?