zoukankan      html  css  js  c++  java
  • 方法转换IE、Firefox、Chrome区别

     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     2 <html xmlns="http://www.w3.org/1999/xhtml">
     3 <head>
     4     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
     5     <title></title>
     6     <script type="text/javascript">
     7         var person1 = {
     8             toLocaleString:function () {
     9                 return "Nikolaos";
    10             },
    11             toString:function () {
    12                 return "Nicholas";
    13             }
    14         };
    15         var person2 = {
    16             toLocaleString:function () {
    17                 return "Grigorios";
    18             },
    19             toString:function () {
    20                 return "Greg";
    21             }
    22         };
    23         var people = [person1, person2];
    24         console.log(people);
    25         console.log(people.toString());
    26         console.log(people.toLocaleString());
    27     </script>
    28 </head>
    29 <body>
    30 </body>
    31 </html>

    IE下显示

    Nicholas,Greg

    Nicholas,Greg  

    Nikolaos, Grigorios

    firefox、chrome下显示

    Nicholas(Object),Greg(Object)

    Nicholas,Greg 

    Nikolaos, Grigorios
  • 相关阅读:
    canvas粒子时钟
    数组复制
    对象拷贝
    不常见但很有用的chrome调试工具使用方法
    变形transform的副作用
    CSS页面渲染优化属性will-change
    CSS实现导航条Tab切换的三种方法
    CSS两端对齐
    CSS倒影
    CSS滤镜
  • 原文地址:https://www.cnblogs.com/qzsonline/p/2324821.html
Copyright © 2011-2022 走看看