最佳答案
我如何检查如果一个变量是JavaScript字符串?
我试过了,不管用……
var a_string = "Hello, I'm a string.";
if (a_string typeof 'string') {
// this is a string
}