我是使用knockout2.1.0進行基因敲除的新手。 我有一個外部java腳本文件,但它不在我的html文件中調用。我不明白。無法在html中調用.js(使用基因敲除)
我已經加入我的HTML文件中的下列
<script src="Scripts/TestJavascript.js"></script>
JS文件
///<reference path="~/Scripts/jquery-1.8.1.min.js">
///<reference path="~/Scripts/knockout-2.1.0.debug.js">
$(function AppViewModel() {
this.firstName = ko.observable("rash");
this.lastName = ko.observable("Bertington");
this.fullName = ko.computed(function(){
return this.firstName() + " " + this.lastName();
}, this);
})
ko.applyBindings(new AppViewModel());
感謝。
我的意思不是遇到苛刻,但你問題很混亂......你能提供一些更相關的代碼嗎? –