I know how to change the value of a span or div using:
onClick= document.getElementById("searchkey").value = "type min 3
letters";
but that does not work for an input type=text element.
What is the proper way to do that?
On 2021-09-05, bill <william@TechServSys.com> wrote:
I know how to change the value of a span or div using:
onClick= document.getElementById("searchkey").value = "type min 3
letters";
but that does not work for an input type=text element.
What is the proper way to do that?
Did you mean that the other way around? If so you might want the 'textContent' property.
I know how to change the value of a span or div using:
onClick= document.getElementById("searchkey").value = "type min 3
letters";
but that does not work for an input type=text element.
What is the proper way to do that?
On Sun, 5 Sep 2021 22:44:44 -0000 (UTC), Jon Ribbens wrote:
On 2021-09-05, bill <william@TechServSys.com> wrote:
I know how to change the value of a span or div using:
onClick= document.getElementById("searchkey").value = "type min 3
letters";
but that does not work for an input type=text element.
What is the proper way to do that?
Did you mean that the other way around? If so you might want the
'textContent' property.
And make sure correct quoting is used. Use HTML entity and escape sequence
if necessary.
Cause, the provided sample code will never work, regardless of what HTML tag/element it is on.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 469 |
Nodes: | 16 (2 / 14) |
Uptime: | 43:02:05 |
Calls: | 9,449 |
Calls today: | 6 |
Files: | 13,596 |
Messages: | 6,111,868 |
Posted today: | 1 |