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
Post a Comment