Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

assign jquery variable to input [closed]

Tags:

jquery

I am trying to pass jquery variable value to input text. I tried the below and getting message "The left-hand side of an assignment must be a variable". How to send jquery variable value to input box?

//Input is as below

<input  type="hidden" id="rowValues" value="" name="rowValues">

//jquery is as below. rowData variable value should be passed to input

 var rowData = JSON.stringify(rows); ; 

$("#rowValues").val() = rowData; 
like image 238
user1710288 Avatar asked Oct 18 '12 07:10

user1710288


1 Answers

do:

$("#rowValues").val(rowData);
like image 168
Sudhir Bastakoti Avatar answered Nov 27 '22 00:11

Sudhir Bastakoti