我剛剛在Asp.Net MVC中開始工作,此刻我一無所知。所以我的任務是在.js文件中本地化文本。我的問題是,我似乎無法在瀏覽器中顯示此對話框標籤,我想替換的文本是「刪除A到B」。我試着用'this.a'代替這個文本來使用我的變量'a',但它不起作用。在.js文件中本地化一個字符串
function Remove() {
var a = "";
this.Load = function() {
...`enter code here`
});
this.InitEventHandlers = function() {
$("#updateRemove").click(function (e) {
amplify.publish("UpdateRemove");
e.preventDefault();
});
$("#removeA").click(function() {
$("#removeA").dialog({
title: "Remove A to B",
width: 300,
autoOpen: true,
modal: true,
draggable: false,
resizable: false,
dialogClass: "RemoveB",
open: function() { $(this).appendTo("RemoveC"); }
});
});
...
問題尚不清楚。你能解釋一下嗎? – Wolf
試試閱讀:http://stackoverflow.com/questions/104022/localize-strings-in-javascript?answertab=votes#tab-top – mipe34