Std XI I.T || Skill Set 3 – JavaScript || SOP4
SOP4: Create event driven JavaScript programs for the following using appropriate variables, JavaScript inbuilt string functions and control structures. To accept number and validate if the given value is a number or not by clicking on the button. <!DOCTYPE html> <html> <head> <title>sop4</title> <script language=javascript> function val() { n=f1.v.value if(!isNaN(n)) document.write(n+" is a number") else document.write(n+" is a not number") } </script> </head> <body> <form name=f1> Enter Value:- <input type=text name=v> <br><br> <input type=Submit value=Submit onClick=val()> </form> </body> </html> To calculate addition and division of two numbers. <!DOCTYPE html> <html> <head> <title>sop4</title> <script language=javascript> function add() {...