How to convert decimal number to round off figure using JQuery

June 12, 2015 0 Comments

If you want to display decimal number to fix digit number. I mean to say i have a decimal number like 123.123 and i want to display round of number then use Jquery round method.

 <%@ Page Language="C#" %>

<!DOCTYPE html>

<html xmlns="">
<head runat="server">
<script src="Scripts/jquery-1.10.2.js"></script>
    <form id="form1" runat="server">
    Enter Number: <input id="Text1" type="text" value="123.123" />
<input id="Button1" type="button" value="Round Off value" />
<br />
<label id="result" style="font-size:16px" />
When we click on the button , TextBox value will be converted into Round Off value using JQuery method.

Jacob Lefore

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google