TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Pooja Chowdhury
NA
396
39.7k
tax calculation
Aug 1 2017 3:48 AM
javascript:
function
taxCalc()
{
var
_txt1 = document.getElementById(
'<%= txtPremamnt.ClientID %>'
);
var
_txt2 = document.getElementById(
'<%= txtSrvtax.ClientID %>'
);
var
_txt3 = document.getElementById(
'<%= txtTotamnt.ClientID %>'
);
var
t1=0, t2=0;
if
(_txt1.value !=
""
) t1=_txt1.value;
if
(_txt2.value !=
""
) t2=_txt2.value;
_txt3.value = parseInt(t1) + (parseInt(t1) * (parseInt(t2) / 100));
}
<
asp:TextBox
ID
=
"txtPremamnt"
runat
=
"server"
onkeypress
=
"taxCalc();"
class
=
"form-control "
placeholder
=
"Pre. Amt"
>
</
asp:TextBox
>
<
asp:TextBox
ID
=
"txtSrvtax"
runat
=
"server"
placeholder
=
"Srv. Tax"
class
=
"form-control "
>
</
asp:TextBox
>
<
asp:TextBox
ID
=
"txtTotamnt"
runat
=
"server"
placeholder
=
"Tot. Amt"
class
=
"form-control "
>
</
asp:TextBox
>
OUTPUT:
Pre. Amt:1000
Tax: 10
Total:110
when I changed
Pre. Amt:1000
Tax: 10
Total:1100
Please check this
Reply
Answers (
3
)
how to unselect the table column using javascript
html form data to be saved in excel using javascript