這是一個很短的例子,但我想知道是否有一種方法使用HTML標記的XML或HTML文件,而不是像下面這樣在JavaScript中包含它。html模板在jquery或javascript
我知道那裏有模板庫,但我真的只想做一些簡單的事情,不涉及jQuery以外的任何庫。
var description = this.name;
if description == 'full') {
return "<div><textarea cols='50' rows='50'>" + this.value + "</textarea></div>";
} else {
return "<div><textarea cols='50' rows='15'>" + this.value + "</textarea></div>";
};
感謝
ajax ??????????? – Rooster
你的意思是我應該谷歌「阿賈克斯」找到我的答案?謝謝 – SkyeBoniwell
並可能實現它。 – Fallenreaper