Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I set the value of an input box with a button click? #525

Closed
cbmeeks opened this issue Mar 26, 2024 · 1 comment
Closed

How do I set the value of an input box with a button click? #525

cbmeeks opened this issue Mar 26, 2024 · 1 comment

Comments

@cbmeeks
Copy link

cbmeeks commented Mar 26, 2024

It seems I don't fully understand the "magic" of Hyperscript but I would have thought this would work:

<input id="blah" type="text" />
<button  _="on click put 'hello' into #blah.innerText">Click</button>

No variation of that statement seems to work. Nothing happens.

I've tried this as well:

<button  _="on click set #blah.innerText to 'blah'">Click</button>

What am I missing?

Thanks

@cbmeeks
Copy link
Author

cbmeeks commented Mar 26, 2024

Never mind. It was .value not .innerText

@cbmeeks cbmeeks closed this as completed Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant