Javascript判断参数类型
function (options, param) { alert(typeof options); if (typeof options == "string") { alert("字符串"); } if (typeof options == "number") { alert("数字"); } }
function (options, param) { alert(typeof options); if (typeof options == "string") { alert("字符串"); } if (typeof options == "number") { alert("数字"); } }