js Math.pow什么意思

JavaScript013

js Math.pow什么意思,第1张

一个Math函数,

例如:Math.pow(4,3)返回4的三次幂,

用法:Math.pow(x,y)

x必需传。底数。必须是数字。

y必需传。幂数。必须是数字。

如果结果是虚数或负数,则该方法将返回 NaN。如果由于指数过大而引起浮点溢出,则该方法将返回 Infinity

(水仙花数也被称为超完全数字不变数、自恋数、自幂数、阿姆斯特朗数。水仙花数是指一个3位数,它的每个位上的数字的3次幂之和等于它本身 例如: 1~3 + 5~3 + 3~3 =153)

(质数就是在大于1的自然数中,除了1和它本身以外不在有其他因数的自然数)

a:11,b:10

A [] B [""] C [undefined] D [null]

A ['false'] B [false] C[0] D[]

A null B undefined C “hello” D“world”

A "llowo" B "llow" C "llo" D null

A "llowo" B "llow" C "llo" D null

A getYear()

B getMonth()

C getDay()

DgetDate()

A 基于对象

B 移动端优先

C 事件驱动

D 跨平台

A String

B Float

C Number

D Null

A 任意单个字符

B 任意单个字母

C 任意单个字母、数字、下划线

D 任意单个字母、数学、下划线、$符号

A <javascript>

B <script>

C <scripting>

D <js>

A var s = 'heloe'

B var n = 20

C var x = document.getElementsByTagName('box')

D var y = document.querySelectorAll('ul li')

A document.createElement

B document.createTextNode

C document.getElementById

B document.querySelector

A ele.innerText

B ele.innerHTML

C ele.textContent

D ele.htmlContent

插入排序的算法描述的是一种简单直观的排序算法,它的工作原理是通过构建有序序列,对于未排序的数据,在已排序序列中从后向前扫描,找到对应位置并插入

A.对数组里数据的排序可以用sort函数,如果排序效果非预期,可以给sort函数加一个排序的参数

B.reverse用于对数组数据的倒序排列

C.向数组的最后位置加一个新元素,可以用pop方法

D.unshift方法用于向数组删除第一个元素

A.window.status = "已经选中该文本框"

B.document.status = '已经选中该文本框'

C.window.screen = '已经选中该文本框'

D.document.screen = '已经选中该文本框'

A <input type="button" value="new" onclick="open('new.html','_blank')" />

B. <input type="button" value="new" onclick="window.location = 'new.html'" />

C.<input type="button" value="new " onclick = "location.assign('new.html)">

D. <form target = "_blank" action="new.html">

<input type="submit" value="new" />

</form>

A.<script type="text/javascript">document.write(<h1>hello</h1>)</script>

B.<script type="text/javascript">document.write("<h1>hello</h1>")</script>

C.<script type="text/javascript"><h1>hello</h1></script>

D.<h1><script type="text/javascript">document.write("hello")</script></h1>

以下说法中正确的是(AD)

A.在页面的第二个文本框中输入内容后,当目标离开第二个文本框时,第一个文本框的内容不变

B.在页面的第一个文本框中输入内容后,当鼠标离开第一个文本框时,将在第二个文本框中复制第一个文本框的内容

C.在页面的第二个文本框中输入内容后,当鼠标离开第二个文本框时候,将在第一个文本框中复制第二个文本框的内容

D.在页面的第一个文本框中输入内容后,当鼠标离开第一个文本框时,第二个文本框的内容不变