这个是int (state)
for(var i=0;i<result.length;i++){
switch(result[i].state){
case 11:
console.log('11');
break;
case 1:
console.log('1');
break;
}这个是var 类型。
var id = $(elem).attr("id");
var url = $(elem).attr("url");
var text = $(elem).attr("dd_text");
var type = $(elem).attr("type");
console.log(id);
console.log(url);
console.log(text);
console.log(type);
var content = "<iframe frameborder=0 scrolling='auto' style='width:100%;height:100%' src='"+url+"'></iframe>";
switch(type){
case '0':
addTab(id,text,content);
break;
case '1':
window.open(url);
break;
case '2':站长微信:xiaomao0055
站长QQ:14496453