Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.3.min.js " type="text/javascript"></script>
</head>
<body>
<input type="text" id="input1" placeholder="put some text"></br>
<button id="btn4">set session storage</button>
<button id="btn5">remove</button>
<script type="text/javascript">
$(document).ready(function () {
if (!window.sessionStorage) {
document.write("not supported!");
}
if (sessionStorage.getItem("session_storage") != null) {
$("#input1").val(sessionStorage.getItem("session_storage"));
}
$("#btn4").click(function () {
var value = $("#input1").val();
sessionStorage.setItem("session_storage", value);
alert("now refresh your page");
});
$("#btn5").click(function () {
sessionStorage.removeItem("session_storage");
});
});
</script>
</body>
</html>
The most helpful JQUERY solutions
plugin get client ip address using jqueryJQUERY Click to see more ... 10.9K 1.8K