You can easily get textbox or form elements value using javascript. You can use one of the the following method to get the textbox value
- document.getElementById
- document.getElmentsByTagName
- document.getElementsByName
- document.getElementsByClassName
- document.reg_frm.fname //where reg_frm is your form name; fname is your textbox name
Example:
<!DOCTYPE html>
<html>
<body>
<form name="reg_frm">
First Name: <input type="text" name="fname" class="myclass" id="myText" value="CODEFORBEGINNER">
<p>Click the button to display the value of the value attribute of the text field.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
</form>
<script>
function myFunction() {
//use any one method to get output
var x = document.getElementById("myText").value;
var x = document.getElementsByName("fname")[0].value;
var x = document.getElementsByTagName("input")[0].value;
var x = document.getElementsByClassName("myclass")[0].value;
var x = document.reg_frm.fname.value;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>
NINTARABABY Baby Blankets, Breathable & Cooling, Feather-Soft for Newborns & Infants, Baby Gift for Girls & Boys, 30 x 40 Inches
₹949.00 (as of March 26, 2026 11:19 GMT +05:30 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Cetaphil Baby Gentle Wash & Shampoo - (50ml)
₹213.00 (as of March 26, 2026 11:19 GMT +05:30 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Pampers Complete Skin Comfort Pants, Anti-rash blanket, Lotion with Vitamin E & Aloe Vera, Extra Large size baby diapers (XL) 56 Count, 12-17kg
₹1,003.00 (as of March 26, 2026 11:19 GMT +05:30 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Pampers Happy Sleep Pant Style Baby Diapers, Small (S), 60 Count, 1 Pampers = 1 Night Sleep, with Anti Rash Shield, 4-8 Kg Diapers
₹421.00 (as of March 26, 2026 11:19 GMT +05:30 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)MamyPoko Pants Extra Absorb Baby Diapers, Large (L size) | 9-14 kg | 64 Count |Deep Sleep Diapers| Soft gentle fit |Deep Absorbent Crisscross | skin friendly with coconut oil |
₹734.00 (as of March 26, 2026 11:19 GMT +05:30 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)TEDDYY Easy Baby M Size Diaper Pant Style | 74 Count (Medium) | 7–12 kg (Pack of 1) | Long Protection Hours | Anti-Bacterial | Airy Breathable Fit | Rapid Soaker Channels with Wetness Indicator
₹474.00 (as of March 26, 2026 11:19 GMT +05:30 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Amazon Brand - Supples Premium Baby Diaper Pants | 72 Baby Diapers | Medium | 7-12 Kg | 12 Hrs Absorption | Cushiony Cotton Soft Fabric | Phthalates-Free | Triple Leak Guard
₹489.00 (as of March 26, 2026 11:19 GMT +05:30 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)R for Rabbit Little GrownUp Tunes Baby Potty Training Seat with Music, Soft Cushion & Ergonomic Backrest Tissue Storage for Kids | Toilet Seat Weight Up to 50 kg, 1 to 7 Years (Blue White)
₹1,249.00 (as of March 26, 2026 11:19 GMT +05:30 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Mother Sparsh 99% Pure Water (Unscented) Baby Wipes with Lid I Natural Plant made cloth - Super thick Wet Wipes I 72 pcs/pack - Pack of 2 (Super Saver Pack)
₹370.00 (as of March 26, 2026 11:19 GMT +05:30 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)LuvLap Pant Style Baby Diapers, Large (L), 62 Count, For babies of Upto 9-14Kg with Aloe Vera Lotion for rash protection, with upto 12hr protection, Diapers
₹560.00 (as of March 26, 2026 11:19 GMT +05:30 - More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Auto Amazon Links: No products found.
