I want to display the image in the input part (in the input field after the value word) Can jquery do this? Thank.
$("#click").click(function(){ $("#text").append("<img class='loading' src='load.gif'/>"); ... }); <form name="form"> <input type="text" id="text"> <a id="click">search</a> </form>
You are trying to achieve this.
$("#click").click(function(){ $("#text").css('background', 'url(load.gif);'); ... }); <form name="form"> <input type="text" id="text"> <a id="click">search</a> </form>
I am wrong?
You cannot insert image elements inside elements input type="text". However, you can:
input type="text"