微众银行

10月11号晚上去笔试了,做得也不是很理想,现在也还没接到通知,估计。。。。。。

有好几道求程序结果题,这个就没有写下来了

其他也由于现场笔试的严格,页眉写下来多少,大概是选择题,程序输出题,还有程序题

1、飞严格模式中,10+079的结果是89

2、["1","0xA","039"].map(parseInt)  =>[1, NaN, 0]

map() 把每个元素通过函数传递到当前匹配集合中,生成包含返回值的新的 jQuery 对象。
[1,2,3,4].map( function(item) { 
   alert(item); 
}) 
get() 方法获得由选择器指定的 DOM 元素。

3、Doctype...混杂模式和兼容模式...意义

4、CSS引入方式,link和@import的区别

5、实现一个可以把时间截解析成任意格式字符的函数

http://www.soso.io/article/21918.html

Date.prototype.format = function(format) { 
       var date = { 
              "M+": this.getMonth() + 1, 
              "d+": this.getDate(), 
              "h+": this.getHours(), 
              "m+": this.getMinutes(), 
              "s+": this.getSeconds(), 
              "q+": Math.floor((this.getMonth() + 3) / 3), 
              "S+": this.getMilliseconds() 
       }; 
       if (/(y+)/i.test(format)) { 
              format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length)); 
       } 
       for (var k in date) { 
              if (new RegExp("(" + k + ")").test(format)) { 
                     format = format.replace(RegExp.$1, RegExp.$1.length == 1 
                            ? date[k] : ("00" + date[k]).substr(("" + date[k]).length)); 
              } 
       } 
       return format; 
} 
var d = new Date().format('yyyy-MM-dd'); 
console.log(d); // 2013-11-04 

6、用原生接口实现一个getElementByClassName的方法

function getElementsByClassName(tagName,className) {
        var tag = document.getElementsByTagName(tagName);
        var tagAll = [];
        for(var i = 0 ; i<tag.length ; i++){
            if(tag[i].className.indexOf(className) != -1){
                tagAll[tagAll.length] = tag[i];
            }
        }
 
        return tagAll;
 
    }

7、IE8不支持的HTML5标签有?

8、rem

这个单位与em有什么区别呢?区别在于使用rem为元素设定字体大小时,仍然是相对大小,但相对的只是HTML根元素。这个单位可谓集相对大小和绝对大小的优点于一身,通过它既可以做到只修改根元素就成比例地调整所有字体大小,又可以避免字体大小逐层复合的连锁反应。目前,除了IE8及更早版本外,所有浏览器均已支持rem。对于不支持它的浏览器,应对方法也很简单,就是多写一个绝对单位的声明。这些浏览器会忽略用rem设定的字体大小。

em单位是相对于父节点的font-size,会有一些组合的问题,而rem是相对于根节点(或者是html节点),也就是说你可以在html节点定义一个单独的字体大小,然后所有其他元素使用rem相对于这个字体的百分比进行设置,这样就意味着,我们只需要在根元素确定一个参考值

9、重构与回流

 

posted @ 2016-10-13 21:54  chenxj  阅读(283)  评论(0)    收藏  举报