jquery - How do I replace onclick button to link format -
here current code
<input type="submit" value="result" id="loadbutton" /> $.ajaxsetup ({ cache: false }); var ajax_load = "<img class='loading' src='/loading.gif' alt='loading...' />"; var loadurl = "/result.php"; $("#loadbutton").click(function(){ $("#result").html(ajax_load).load(loadurl); });
how replace submit button
<input type="submit" value="result" id="loadbutton" />
to link
<a href="/result.php">result</a>
the normal way:
<a href="/result.php" id="result">result</a> <script> $('#result').click(function() { // }); </script>
Comments
Post a Comment