开发者

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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜