JiangLe

JS--switch 语句

说明:js中switch语句的语法风格

function convert(x){
    switch(x)
    {
        case "string":
            document.write("string");
            break;
        case "number":
            document.write("number");
            break;
        default:
            document.write("null");
            break;
    }
}

 

分类:

技术点:

相关文章: