字節(jié)跳動秋招2017面試題

1.?變量a是一個64位有符號的整數(shù),初始值用16進(jìn)制表示為:0Xf000000000000000; 變量b是一個64位有符號的整數(shù),初始值用16進(jìn)制表示為:0x7FFFFFFFFFFFFFFF。 則a-b的結(jié)果用10進(jìn)制表示為多少?()

正確答案: C ??你的答案: D?(錯誤)

1

-(2^62+2^61+2^60+1)

2^62+2^61+2^60+1

2^59+(2^55+2^54+…+2^2+2^1+2^0)



?0x7FFFFFFFFFFFFFFF+1=0X8000000000000000,

那么a-b=0Xf000000000000000-0X8000000000000000+1=0X7000000000000001=16^15*7+16^0*1=2^60*7+1=2^60*(2^2+2^1+2^0)+1=2^62+2^61+2^60+1

2.塊級元素

<input>

<ul>

<hr>

<li>

<div>

3.域名不同不能使用ajax

jsonp方式不可以發(fā)出post請求其他域名下的接口

通過iframe設(shè)置document.domain可以實現(xiàn)跨域

4.不可繼承的:display、margin、border、padding、background、height、min-height、max- height、width、min-width、max-width、overflow、position、left、right、top、 bottom、z-index、float、clear、table-layout、vertical-align、page-break-after、 page-bread-before和unicode-bidi。

所有元素可繼承:visibility和cursor。

內(nèi)聯(lián)元素可繼承:letter-spacing、word-spacing、white-space、line-height、color、font、 font-family、font-size、font-style、font-variant、font-weight、text- decoration、text-transform、direction。

塊狀元素可繼承:text-indent和text-align。

列表元素可繼承:list-style、list-style-type、list-style-position、list-style-image。

表格元素可繼承:border-collapse。


5.typeof Symbol() ? ?//"symbol"

typeof Number()????//"number"

typeof String()????//"string"

typeof Function()????//"function"

typeof Object() ? ?//"object"

typeof Boolean()????//"boolean"

typeof null? ? //"object"

typeof undefined????//"undefined"

6.get請求Content-type只能是text/html

get請求可以跨域、post請求不能跨域

get和post的可傳輸內(nèi)容大小不一樣,一個有限制一個沒有限制

get和post傳輸?shù)膬?nèi)容存放的位置不一樣,一個放在header,一個放在body

7.一般來說,選擇器的優(yōu)先級(從上往下依次降低)是:

(1)在屬性后面使用 !important 會覆蓋頁面內(nèi)任何位置定義的元素樣式。

(2)作為style屬性寫在元素內(nèi)的樣式

(3)id選擇器

(4)類選擇器

(5)標(biāo)簽選擇器

(6)通配符選擇器

8.

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容