开发者

HTML Textbox display tooltip value as the same as text box value whichever keys enter

开发者 https://www.devze.com 2023-04-10 17:02 出处:网络
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 k

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

精彩评论

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

关注公众号