aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

jQuery Round Off Numbers with Decimal Values Example using JavaScript Math.round Function

Mar 11, 2015

Here I will explain how to use
jQuery to round off numbers with decimal values example using JavaScript Math.round function or jQuery round off (roundup or rounddown) number with decimal values using JavaScript Math.round function.

By using Math.round JavaScript function we can round off (roundup or rounddown) numbers with decimal values using jQuery like as shown below

Math.round(10.2345) // returns 10
Math.round(40.789) // returns 41

If you want to check it in complete example you need to write the code like as shown below

<html xmlns="">
<title>jQuery Roud off numbers</title>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
$(function () {
$('#btnClick').click(function () {
<form id="form1">
Enter Number: <input type="text" id="txtNumber" value="14245.56345" /><br />
<input type="button" value="Change Number" id="btnClick" />
Round Off Number:<label id="lblResult" style=" font-weight:bold; font-size:14px"/>
Live Demo

For live demo enter number with decimal value in below textbox and click button to round off numbers

Enter Number:
Round Off Number:

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Anonymous said...


Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.