執行$ yo bee 后生成的結構和圖上的不一樣,且運行 demo/dev_index.html所看到內容并沒有文字.
稍微看了下,似乎是article.js下缺少依賴模塊kg/xtemplate/3.3.3/runtime導致的,debug模式下竟然還沒有任何報錯信息……
稍微看了下,似乎是article.js下缺少依賴模塊kg/xtemplate/3.3.3/runtime導致的,debug模式下竟然還沒有任何報錯信息……
2016-03-02
void KISSY.ready (fn)
Parameters: fn (function) – 回調函數, 在 DOM 加載完畢時執行.
Parameters: fn (function) – 回調函數, 在 DOM 加載完畢時執行.
2016-02-09
我用這種方式實現了,但教程里的出了未知的錯誤
IO({
type : "post",
url : "login.jsp",
data : {
user : $(".user").val(),
email : $(".email").val(),
},
success : function(msg) {
$("span").text("異步post數據成功\n" + msg);
}
});
IO({
type : "post",
url : "login.jsp",
data : {
user : $(".user").val(),
email : $(".email").val(),
},
success : function(msg) {
$("span").text("異步post數據成功\n" + msg);
}
});
2016-01-28
KISSY.use("node,io", function(S, Node, IO) {
var $ = Node.all;
IO({
type : "get",
dataType : "json",
url : "1.json",
data : {},
success : function(data) {
$('body').append("<p>"+data.name+"來自"+data.location+"</p><p><img src='"+data.avatar_url+"' width='50'></p>");}});});
var $ = Node.all;
IO({
type : "get",
dataType : "json",
url : "1.json",
data : {},
success : function(data) {
$('body').append("<p>"+data.name+"來自"+data.location+"</p><p><img src='"+data.avatar_url+"' width='50'></p>");}});});
2016-01-27
這里等價的代碼有一些錯誤,應當是
IO({
type : "get",
dataType : "jsonp",
url : 'https://api.github.com/repos/minghe/auth',
data : {},
success : function(authData) {
$('body').append(
'<p>' + authData.data.name + ':' + authData.data.description
+ '</p>');
}
});
IO({
type : "get",
dataType : "jsonp",
url : 'https://api.github.com/repos/minghe/auth',
data : {},
success : function(authData) {
$('body').append(
'<p>' + authData.data.name + ':' + authData.data.description
+ '</p>');
}
});
2016-01-27