1.return"hello"+(who?","+who:"");這行代碼是判斷who是否為空嗎?沒見過這個語法2.vartype=""functionBlock(){this.new=function(){type=type||"B1";}this.transform=function(type){switch(type){case"B1"://變縱向type="B2";break;case"B2"://變橫向type="B1";break;}}}varb=newBlock();varc=b.new();vara=b.transform(type);alert(type);b.transform(type);alert(type);為什么b.transform(type)不能把全局變量中的B1改為B2這插入代碼片段為什么沒有格式...
新人求助2個js問題
慕田峪7331174
2019-04-08 09:21:38