I am generating a random number when I click on a button and after generating this number I enter as the value
of a input
. But when I click the button everything follows normally the value is generated, so much so that I use the alert()
function to check if the number is actually being generated. The script generates the number I can put in the input I want, but after value
of this input
is changed the page gives a reload. I can not identify the person responsible for this reload. I'm using jQuery and the Foudation 5 framework.
Follow the Fiddle: link
The button that I click to do this task is this below Carta Aleatória
:
Inordertoconfirmtheoperationofthescript,Icheckedthevalueinsidethebutton.Butevensothepagegivesareloadbyitself.Buttonwiththevalue: