Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Eclipse Collections Categorically: Level up your programming game
this week in the
Open Source Projects
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
HTML Pages with CSS and JavaScript
javascript can access element without using getElementbyId ?
Linwood Hayes
Ranch Hand
Posts: 178
posted 2 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
I saw some sample code like below. I thought we need to use getElementById or getElementsByName. How can document directly access it like document.test... ?
<form name="test"> <input type="text" name="month" value="may" /> <input type="text" name="date" value="25" /> <input type="text" name="hours" value="12" /> <input type="text" name="minutes" value="30" /> </form> ... document.test.month.value = ""; document.test.date.value = "";
Ron McLeod
Marshal
Posts: 4846
609
I like...
posted 2 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Explanation here:
https://developer.mozilla.org/en-US/docs/Web/API/Document/forms
Linwood Hayes
Ranch Hand
Posts: 178
posted 2 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
nice. thanks
This is awkward. I've grown a second evil head. I'm going to need a machete and a tiny ad ...
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to get an html element with its name?
NaN
Setting the form element values dynamically
help me with this problem..
Code without getElementById()
More...