var test1 = '你好'
    var test2 = new Date()
    function isDate(data) {
      return Object.prototype.toString.call(data)
    }
    isDate(test1)
    isDate(test2)
    var result = isDate(test2)
    if (result == '[object Date]') {
      console.log('I am date')
    }
posted on 2019-05-27 17:34  周小姐你好  阅读(450)  评论(0编辑  收藏  举报