tags:

views:

238

answers:

2

How to temporary store the textbox value until I close the browser using JQuery Please help me with the code

+2  A: 

If you only need to store the data on the client, then put it in a Cookie the jQuery Cookie plugin makes this really easy.

$.cookie(COOKIE_NAME, 'beans')
Tom
BEANS!
Jason
A: 

use .data

var $input = $('#inputId');

$input.data('persist', $input.val() );
redsquare