Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
78
rated 0 times [  82] [ 4]  / answers: 1 / hits: 14340  / 10 Years ago, mon, august 4, 2014, 12:00:00

Short question



QUESTION



How can I access the string value 2013-10-20 from the input in HTML to show it in JavaScript?



HTML



<input name=DateStart class=inputPanel type=text size=20 maxlength=20 value=2013-10-20>


JAVASCRIPT



<script javascript=javascript type=text/javascript>
alert(Value: + ???)
</script>


Thanks!


More From » html

 Answers
4

Assuming you have one input with the name DateStart(use id's):



alert(Value:  + document.getElementsByName('DateStart')[0].value);

[#43371] Saturday, August 2, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lindsay

Total Points: 402
Total Questions: 109
Total Answers: 109

Location: Tuvalu
Member since Sat, Feb 11, 2023
1 Year ago
;