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
  • 相关阅读:
    前端图片预览
    理解 Promise 过程
    node 小例子 集合
    各大网站处理 高 retina屏 边框 方法
    用js 创建  简单查找 删除 二叉树
    Python_快速安装第三方库-pip
    Python-找字典中公共key-zip reduce lambda
    Python-对字典进行排序
    Python-统计序列中元素
    Python-为元组中每个元素命名
  • 原文地址:https://www.cnblogs.com/qzsonline/p/2324821.html
Copyright © 2011-2022 走看看