Jump to content

Adding


cmb

Recommended Posts

After i posted this i acutally figured this out but i was wondering if their was a better way of doing it

<form id="form6" name="form6" method="post" action="">
      <input name="gsavebtn" type="button" id="gsavebtn" value="Saves" onClick="add()"/>
      <input name="gsave" type="text" id="gsave" value="0" size="2" readonly />
    </form>
<script type="text/javascript">
function add() {
var bm = document.getElementById('gsave').value;
var am = bm * 1 + 1;
document.getElementById('gsave').value = am;

localStorage.setItem( "gsave", am )
}

</script>

Link to comment
https://forums.phpfreaks.com/topic/249357-adding/#findComment-1280670
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.