为什么console.log(typeof eleInner); 得到的值是string, 但是console.log(eleInner instanceof String);得到的值却是false
<!DOCTYPE html><html><head> <title></title></head><body> <p>HelloWorld</p> <script type="text/javascript"> var eleP = document.querySelector("p"); var eleInner = eleP.innerHTML; console.log(typeof eleInner); //string console.log(eleInner instanceof String); //false </script></body></html>
相关分类