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
  • 相关阅读:
    SourceTree 跳过登陆
    input type="file"获取文件名方法
    Chrome浏览器安装vue-devtools插件
    设置文本超出既定宽度隐藏,并显示省略号
    node安装express时找不到pakage.json文件;判断安装成功?
    NoSQL:redis缓存数据库
    NoSQL:Linux操作memcached
    Python:迭代器
    Python函数篇:装饰器
    Python面向对象篇之元类,附Django Model核心原理
  • 原文地址:https://www.cnblogs.com/qzsonline/p/2324821.html
Copyright © 2011-2022 走看看