摘要: 1.定义函数的时候,可以将形参设置为对象 function funExample(obj){ if(obj.attr undifined){ 赋值 } 函数体 } 2.传参的时候,如果没有值的话,得传一个 {} 1)funExample({}) 2)funExample({attr:"111"}) 阅读全文
posted @ 2020-03-16 09:43 锋_锋 阅读(423) 评论(0) 推荐(0) 编辑