<!doctype html> <html> <head> <meta charset="utf-8"> <title>无标题文档</title> </head> <body> <script> alert( deterType(12) ); function deterType(obj){ var tmp = {}.toString.call(obj).split(‘ ‘)[1]; tmp = tmp.substring(0,tmp.length-1); return tmp }; </script> </body> </html>
时间: 2024-10-28 16:57:57