Javascript

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentJavascript

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old September 17th, 2009, 02:56 AM
ismailc ismailc is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 18 ismailc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 35 m 40 sec
Reputation Power: 0
Question Control textbox text on events

Good day, Functions neeeded.

I have a search textbox where I would like to display the "Search Keywords" in text of textbox when blank but when mousemove clear text.

1. When textbox is blank then I would like to display text value "Search Key"
2. Onmouseover & Focus: when text value "Search Key" then blank else valu
3. OnMouseLeave / loosefocus: when text value blank then "Search Key" else value
4. I would also like to change the font.

Please Assist

Reply With Quote
  #2  
Old February 21st, 2017, 04:58 AM
Rashmi.Padia Rashmi.Padia is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jan 2017
Location: Ahmedabad
Posts: 24 Rashmi.Padia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 8 m 8 sec
Reputation Power: 0
Control textbox text on events

Hi,

Try this code,

Code:
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(document).ready(function()
{
    $("p").hover(function()
    {
        $("input:text").val("Search Key").css({"font-size":"200%"});
    }); 
    $("p").mouseleave(function()
    {
        $("input:text").val("");
    });
});

</script>
</head>
<body>
<p>
<input type="text" name="Search key" value="Search key">
</p>
</body>
</html>



Thanks

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentJavascript > Control textbox text on events


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap