Form Submission
How do I make an form submission?
What is a form submission? How do you make a form submission? This script and codes were developed by Sudipta Das on 21 January 2023, Saturday.
Form Submission - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Form Submission</title> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>
</head>
<body> <div class="container-fluid">
<p>
<!-- 1. <input type="submit"> works same as <button> but not as <input type="button">
2. Pressing Enter button submits a form
3. When enter button is pressed, if a <button> or <input type="submit"> is present,its code gets executed. But if <input type="button"> is present, its code won't get executed --> <form action="#" id="form"> <input type="text" id="txt" autocomplete="off"> <!-- <input type="button" value="button" id="button"> --> <input type="submit" value="button" id="button">
<!-- <button>button</button> --> </form> <br> <div class="hidden hd">Hidden</dim>
</p>
</div>
<form name="frmm" onsubmit=submitf()> <input type="text" name="txt" id="txt2" autocomplete="off"> <input type="submit" >
</form>
<div id="ttxt" class="ko"></div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Form Submission - Script Codes JS Codes
function submitf(){ //e.preventDefault(); var x=document.frmm.txt.value; console.log(document.forms); document.getElementById('ttxt').innerHTML=x;
}
$('#button').click(function(e){ console.log('clicked'); $('.hd').removeClass('hidden'); $('.hd').html($('#txt').val()); e.preventDefault();
});
/*
$('#txt').keypress(function(e){
// console.log(e.keyCode); if(e.keyCode===13){ $('.hd').removeClass('hidden'); $('.hd').html($('#txt').val()); }
});
$('#form').submit(function(){ $('.hd').removeClass('hidden'); $('.hd').html($('#txt').val()); return false;
});
*/
Developer | Sudipta Das |
Username | sdas13 |
Uploaded | January 21, 2023 |
Rating | 3 |
Size | 1,993 Kb |
Views | 2,024 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Onepush - best websites | 4,549 Kb |
CSS popup | 1,977 Kb |
Sorting Algorithms | 2,142 Kb |
Wiki Viewer 1 | 3,298 Kb |
Javascript DOM | 1,893 Kb |
PortFolio | 5,177 Kb |
JS and The DOM | 1,686 Kb |
BookHub | 3,872 Kb |
OOJS | 1,952 Kb |
CSS framework | 1,716 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Double box-shadow | Daubac402 | 1,436 Kb |
Falling Down the Rabbit Hole | Rachelnabors | 4,578 Kb |
Progressively reveal dots on a Bezier curve | GreenSock | 2,489 Kb |
React JS Movie Info App | MTushar | 4,870 Kb |
BabyStore | Pablo-Ai | 3,807 Kb |
A Pen by Bryan Rojas | Bryanrojas | 1,873 Kb |
Resize image | Happyhj | 1,892 Kb |
Sinclair Research Computers | MattCowley | 3,068 Kb |
Rain Landing in a Pond | Edball | 3,009 Kb |
Angular-HAML | Cwacht | 2,022 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!