Here i coded form validation using only php with display error messages and checking input fields correctly entered or not Registration Form Name is Required Email Required Password Required Contact Details Required Gender: Male Female Gender is required Address required Please find the below code clearly with bootstrap and css also included. Add bootstrap folder into your project. <!DOCTYPE> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="\bootstrap\css\bootstrap.css"> <link rel="stylesheet" type="text/css" href="\bootstrap\css\bootstrap.min.css"> <script src ="..\bootstrap\js\bootstrap.js"></script> <script src ="..\bootstrap\js\bootstrap.min.js"></script> <title>Form Validation</title> <st...
<html> <head> <title>Two textbox, when enter data in one textbox, it appears in second textbox</title> <link rel="stylesheet" type="text/css" href="style.css"> /<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.3/moment.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ //Addition $("#add").click(function(){ var a = $("#cal1").val(); var b = $("#cal2").val(); $("#result").val(+a + +b); }); //Subtraction $("#sub").click(function(){ var a = $("#cal1").val(); var b = $("#cal2").val(); $("#result").val(+a - +b); }); //Multiplication $("#mul").click(function(){ var a = $("#cal1").val(); v...
Write a program to accept a no. from user and display Sum of Digits. (example: 214= 2+1+4 = 7) < !DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" type="text/css" href="style.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#btn").click(function(){ var x = 0; var y = parseInt($("#sum").val()); while(y>0) { x = x + y % 10; y = Math.floor(y/10); } alert("sum of digits " + x); }); }); </script> </head> <body> <div> <h2>Su...
Thanq Mr.Kiran
ReplyDelete