jquery - Can I convert this to just use an address link? -


i have this:

<input id="docheck" type="button" onclick="docheck('temp'); return false;" /> 

can convert use address tag?

sure, write thus:

<a id="docheck" href="#"> 

then in js:

$(function () {     $('#docheck').click(function(e) {          e.preventdefault();          docheck('temp');     } }); 

you actually write it:

<a id="docheck" href="#" onclick="docheck('temp'); return false;" /> 

but shouldn't, because mixes js markup.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -