var str = "11:222";
/*
* 截取 “ :”之前和之后的值
*/document.write(str.split(':')[0]) //输出11document.write(str.split(':')[1]) //输出222