0
Follows the code:
<button onclick="myFunction(1)">Meu botão</button>
<script>
function myFunction(num) {
alert(num);
}
</script>
Jsfiddle: https://jsfiddle.net/43mt9og8/
Anyone can change value using F12.
Change number myFunction(1)
for myFunction(2)
, and then click button, call the javascript function 2 times.
Each time you change the number, you record it somewhere. (If it changes 50 times, it will call the function 50 times)
There is way before calling the function, check how many numbers recorded ?
Client-side code (in this case javascript) is always at the mercy of "curious" customers, you can make it difficult, but you can’t help it. You can make it difficult for example by taking the "onclick" attribute from html, so it’s not as visible. Ex de brincar com o codigo do lado cliente no google: https://postimg.org/image/6xv0q6lml/
– Miguel
@Miguel, how did the guy make this site ? http://www.galaxyrom.com/ nor
f12
orbotão mouse direito
doesn’t work.– Matheus Miranda