javascript - Is it possible to invoke a function by clicking a part of string? -
$ ("# chk_select"). Html ("Sorry, no such product, click here to create one");
The above row is displayed and when the user clicks on "click here", then call me slideUp (); Javascript is required to perform an action like
. Is this possible?
He ran Wrap a string inside an element, such as:
< Code> $ ("# chk_select"). Html ("Sorry no such product. & Lt; span id = 'link' & gt; Click here & lt; / span & gt; Create one)";
and then type a click handler
$ ("# link"). Click (function () {slideUp ();});
Or you can
$ ("#link"). ("Click", function () {
Comments
Post a Comment