# In a node, how do you pass.js data to .html

**URL:** <https://discourse.nodered.org/t/in-a-node-how-do-you-pass-js-data-to-html/7153>\
**Category:** Meta\
**Created:** [23 January 2019 01:28 UTC](https://discourse.nodered.org/t/in-a-node-how-do-you-pass-js-data-to-html/7153 "2019-01-23T01:28:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JiChen](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@JiChen](https://discourse.nodered.org/u/JiChen)\
**Post date:** [23 January 2019 01:28 UTC](https://discourse.nodered.org/t/in-a-node-how-do-you-pass-js-data-to-html/7153/1 "2019-01-23T01:28:37Z")

</div>

For example, I want to create a database query node that is configured with a database connection via a query button.You write the query in.js, and then you go to the query button on the node, and you display the results as a list.I would like to know how to query the database data from.js to.html

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [23 January 2019 07:05 UTC](https://discourse.nodered.org/t/in-a-node-how-do-you-pass-js-data-to-html/7153/2 "2019-01-23T07:05:40Z")

</div>

This is the same question you asked yesterday: [How does a custom node pass json data from js to HTML](https://discourse.nodered.org/t/how-does-a-custom-node-pass-json-data-from-js-to-html/7126)

If my answer in that thread was not clear then please use that thread to ask for more help.

---

<div class="post-metadata">

**Author:** ![JiChen](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@JiChen](https://discourse.nodered.org/u/JiChen)\
**Post date:** [23 January 2019 07:15 UTC](https://discourse.nodered.org/t/in-a-node-how-do-you-pass-js-data-to-html/7153/3 "2019-01-23T07:15:50Z")

</div>

Ok, thank you. I didn't understand it yesterday. I wonder if there is another way

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [23 January 2019 07:17 UTC](https://discourse.nodered.org/t/in-a-node-how-do-you-pass-js-data-to-html/7153/4 "2019-01-23T07:17:53Z")

</div>

There is not another way. We can help make it clearer to help you. But you need to read what I linked to in the last thread and let us know which bit you are not sure about.
