中文天堂在线播放|777超碰|亚洲男人天堂手机版|露水红颜电影未删减完整版,简单任务国语高清在线观看完整版,成人xxxxx,日本aa在线

JavaScript中用于四舍五入的Math.round方法講解

時(shí)間:2024-11-04 19:28:04 JavaScript

JavaScript中用于四舍五入的Math.round方法講解

  此方法返回一個(gè)數(shù)四舍五入為最接近的整數(shù)的值。

  語(yǔ)法

  Math.round( x ) ;

  下面是參數(shù)的詳細(xì)信息:

  x: 一個(gè)數(shù)字

  返回值:

  返回?cái)?shù)字四舍五入為最接近的整數(shù)的值。

  例子:

  JavaScript Math round() Method

  這將產(chǎn)生以下結(jié)果:

  First Test Value : 1Second Test Value : 21Third Test Value : 20Fourth Test Value : -20

  

【JavaScript中用于四舍五入的Math.round方法講解】相關(guān)文章:

JavaScript的課堂講解09-03

詳解JavaScript中的splice()使用方法08-20

Javascript中arguments對(duì)象的詳解和使用方法08-20

JavaScript常用方法匯總10-25

JavaScript數(shù)組常用方法介紹09-04

javascript跨域訪問的方法07-09

javascript編程異常處理的方法08-04

JavaScript fontcolor方法入門實(shí)例07-07

JavaScript中的with關(guān)鍵字07-24

在Java中執(zhí)行JavaScript代碼07-14