I have such a function, it is launched through the submit button in the form with id="savebaseform" :
$('savebaseform').addEventListener('submit', function(event) { event.preventDefault(); var BB = get_blob(); saveAs( new BB( [savebasetext] , {type: 'text/plain;charset=utf-8' + document.characterSet} ) , (databases[nowbase][0].name) + '.txt' ); }, false); How can I make this function run via a regular link, for example <a href="#" id="save">click</a> ?
$('savebaseform').addEventListener('submit'replace with$('#savebaseform').on('submit'- Stack