# Data From HTML -\> JS To Send data

**URL:** <https://discourse.nodered.org/t/data-from-html-js-to-send-data/73843>\
**Category:** Developing Nodes\
**Created:** [18 January 2023 06:38 UTC](https://discourse.nodered.org/t/data-from-html-js-to-send-data/73843 "2023-01-18T06:38:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fostm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fostm/32/74280_2.png) [@fostm](https://discourse.nodered.org/u/fostm)\
**Post date:** [18 January 2023 06:38 UTC](https://discourse.nodered.org/t/data-from-html-js-to-send-data/73843/1 "2023-01-18T06:38:24Z")

</div>

Hi, I'm Yeon

Data From HTML -\> JS To Send data

Is there any other way to send it besides the input element?

For example, as shown in the picture below,  
Instead of using input elements, you can use the  
I would like to send the value of the P tag as an object to JS

![img1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/0/90c5ef359b6722f6aab5028482f2492a6b6ca64b.png)

![20230118_153140](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/e/2e45308985c12160129466c8ff091a526b7f58c6.png)

![20230118_153229](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/4/b4e233bf3c5879ac2a9d4aaa8756a79fce0c16c0.png)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [18 January 2023 09:23 UTC](https://discourse.nodered.org/t/data-from-html-js-to-send-data/73843/2 "2023-01-18T09:23:55Z")

</div>

> [@fostm](#):
>
> Is there any other way to send it besides the input element?
> 
> For example, as shown in the picture below,  
> Instead of using input elements, you can use the  
> I would like to send the value of the P tag as an object to JS

You need something to trigger - a button is most common though a link can work too. In fact you can make most tags take a click but you should put a tabindex attribute on non-input tags so that users can navigate via the keyboard.

You can also pick up "values" from other tags but not using the val function because that is only for input fields. You would have to grab the text. `$('#xxxx').text()`.

---

<div class="post-metadata">

**Author:** ![fostm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fostm/32/74280_2.png) [@fostm](https://discourse.nodered.org/u/fostm)\
**Post date:** [19 January 2023 00:16 UTC](https://discourse.nodered.org/t/data-from-html-js-to-send-data/73843/3 "2023-01-19T00:16:45Z")

</div>

Thank you very much. TotallyInformation!

I'll do it that way.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 February 2023 00:17 UTC](https://discourse.nodered.org/t/data-from-html-js-to-send-data/73843/4 "2023-02-02T00:17:02Z")

</div>

Closed on 2 February 2023 00:17 UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
