HTML Textbox display tooltip value as the same as text box value whichever keys enter
I have a HTML Text Box,
Whenever I type text to this text box, I want to开发者_运维技巧 show this same text as a Tool tip. Is there any way to make it like that by using JQUERY. If so please let me know it.Do you mean something like that?
$('.textbox').keyup(function() {
$(this).attr('title', $(this).val());
});
Also see my jsfiddle.
Try this
$(function(){
$(".ttip").hide();
$("input").keyup(
function(){
var one=$(this).val();
$(".ttip").fadeIn().text(one);
}
);
});
http://jsfiddle.net/hUAXc/
精彩评论