You can try ‘input[name=”pwd”]’:
function checkForm(){
var form = document.forms[0];
var selectElement = form.querySelector('input[name="pwd"]');
var selectedValue = selectElement.value;
}
take a look a this http://jsfiddle.net/2ZL4G/1/
More Related Contents:
- How does this code call id with html?
- What’s the difference between event.stopPropagation and event.preventDefault?
- How to save an HTML5 Canvas as an image on a server?
- How can I unset a JavaScript variable?
- Is it possible to send a variable number of arguments to a JavaScript function?
- Cross browser JavaScript (not jQuery…) scroll to top animation
- How do I upload a file with the JS fetch API?
- How can I guarantee that my enums definition doesn’t change in JavaScript?
- How to create a dialog with “Ok” and “Cancel” options
- HTML5 Canvas to PNG File
- “var” or no “var” in JavaScript’s “for-in” loop?
- How to show progress bar while loading, using ajax
- Console returns undefined [duplicate]
- How to use jQuery in AngularJS
- How do I specify the time zone when creating a JavaScript Date?
- How to handle an ActiveX event in Javascript
- ES6 `export * from import`?
- Creating a select box with a search option
- Does the comma operator influence the execution context in Javascript?
- How to post query parameters with Axios?
- Why is 9999999999999999 converted to 10000000000000000 in JavaScript?
- Copy selected text to the clipboard WITHOUT using flash – must be cross-browser
- How to remove global “use strict” added by babel
- Prevent browser from loading a drag-and-dropped file
- Cannot read property ‘onClicked’ of undefined when using chrome.action or chrome.browserAction
- I need to get all the cookies from the browser
- Pass accepts header parameter to jQuery AJAX
- Javascript: interpret string as object reference? [duplicate]
- Detecting collision of rectangle with circle
- Horizontal scrolling with mouse wheel in a div