I have a value that appears in the span tag. If I want to publish a value, I must assign this value to the input. So this is the code that I wrote to assign a value to the input and try to publish that value. But when I warn the assigned value, showing it as
[object Object]
Pls check the code and correct me.
var value = $("#spanElement").text();
var lower=$("#inputElement").val(value);
alert(lower);
and I tried it also
var value = $("#spanElement").text();
var lower=$("#inputElement").val(value);
alert(lower);
Both of the above codes show
[object Object]
Because of this, I cannot send values.
source
share