mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-28 21:41:40 +00:00
add example of js:
prefix for hx-vals
fixes https://github.com/bigskysoftware/htmx/issues/570
This commit is contained in:
parent
a8353bd540
commit
1b44728f49
@ -14,6 +14,8 @@ If you wish for `hx-vals` to *evaluate* the values given, you can prefix the val
|
||||
|
||||
```html
|
||||
<div hx-get="/example" hx-vals='{"myVal": "My Value"}'>Get Some HTML, Including A Value in the Request</div>
|
||||
|
||||
<div hx-get="/example" hx-vals='js:{myVal: calculateValue()}'>Get Some HTML, Including a Dynamic Value from Javascript in the Request</div>
|
||||
```
|
||||
|
||||
### Security Considerations
|
||||
|
Loading…
x
Reference in New Issue
Block a user