.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> VBScript >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

simple Calculator using vbscript With Html

Posted By:NATHAN ISRAEL       Posted Date: October 05, 2011    Points: 40    Category: VBScript    URL: http://www.dotnetspark.com  

simple Calculator using vbscript With Html
 

calc.html
CALCULATOR USING VBSCRIPT


CALCULATOR







calc.vbs

sub b0_onclick()
fcalc.rtext.value=fcalc.rtext.value & "0"
end sub

sub b1_onclick()
fcalc.rtext.value=fcalc.rtext.value & "1"
end sub

sub b2_onclick()
fcalc.rtext.value=fcalc.rtext.value & "2"
end sub

sub b3_onclick()
fcalc.rtext.value=fcalc.rtext.value & "3"
end sub

sub b4_onclick()
fcalc.rtext.value=fcalc.rtext.value & "4"
end sub

sub b5_onclick()
fcalc.rtext.value=fcalc.rtext.value & "5"
end sub

sub b6_onclick()
fcalc.rtext.value=fcalc.rtext.value & "6"
end sub

sub b7_onclick()
fcalc.rtext.value=fcalc.rtext.value & "7"
end sub

sub b8_onclick()
fcalc.rtext.value=fcalc.rtext.value & "8"
end sub

sub b9_onclick()
fcalc.rtext.value=fcalc.rtext.value & "9"
end sub

sub bdot_onclick()
fcalc.rtext.value=fcalc.rtext.value & "."
end sub

sub b7_onclick()
fcalc.rtext.value=fcalc.rtext.value & "7"
end sub

sub bs2_onclick()
fcalc.rtext.value=fcalc.rtext.value*fcalc.rtext.value
end sub

sub bs3_onclick()
fcalc.rtext.value=fcalc.rtext.value*fcalc.rtext.value*fcalc.rtext.value
end sub

sub bonex_onclick()
fcalc.rtext.value=1/fcalc.rtext.value
end sub

sub bsqr_onclick()
fcalc.rtext.value=sqr(fcalc.rtext.value)
end sub

sub bsin_onclick()
fcalc.rtext.value=sin(fcalc.rtext.value)
end sub

sub bcos_onclick()
fcalc.rtext.value=cos(fcalc.rtext.value)
end sub

sub btan_onclick()
fcalc.rtext.value=tan(fcalc.rtext.value)
end sub



     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend