add example of js: prefix for hx-vals

fixes https://github.com/bigskysoftware/htmx/issues/570
This commit is contained in:
carson 2021-09-06 08:47:54 -06:00
parent a8353bd540
commit 1b44728f49

View File

@ -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