how to store value in session using javascript in php

JavaScript
$(document).ready(function(){ $('.button').click(function(){var href = $(this).val();$.session.set("yoursessioname", "storevalue");}) });
alert($.session.get("yoursessioname"));
Source

Also in JavaScript: