How to link jQuery with HTML buttons?
Hej!
I have this code (JUST AN EXAMPLE !):
function random(min, max) {
return min + parseInt(Math.random() * (max-min+1));
}
function getKey(length, charset) {
var key = "";
while(length--) {
key += charset[random(0, charset.length-1)];
}
return key;
}
$(document).ready(function() {
var key = getKey(16, "0123456789ABCDEF");
});
And want to link this (javascript) to a submit-input-button (html) (or
something like this). So, when I clicked the button he generates each time
a new "key".
Can you please find with me a solution? :-)
No comments:
Post a Comment