Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6356909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:03:44+00:00 2026-05-24T23:03:44+00:00

In my input field (text), I have a text which disappears once it is

  • 0

In my input field (text), I have a text which disappears once it is clicked. How can I make this text a shade lighter by editing its colour?

Sorry, the code looks messy, I had to chop it up to show you.

Thanks!

James

<form>
   <input type="text" name="search" size="35"    
    onclick="this.value='';"onfocus="this.select()"
    onblur="this.value=!this.value?'Job Title   
    e.g. Assistant Manager':this.value;"
    value="Job Title e.g. Assistant Manager" 
    style="background-color:white; border: 
    solid 1px #6E6E6E; height: 30px; font-size:18px; 
    vertical-align:9px"/>

   <input type="text" name="searchterm" size="35" 
    style="background-color:white; border: solid 1px #6E6E6E;
    height: 30px; font-size:18px; vertical-align:9px"/>

   <input type="image" src="but.tiff" alt="Submit" width="60">
</form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:03:46+00:00Added an answer on May 24, 2026 at 11:03 pm

    Maybe something like this (just add your style):

    <input type="text" 
           size="35" 
           value="Job Title e.g. Assistant Manager" 
           style="background-color:white; 
                  border: solid 1px #6E6E6E;
                  height: 30px; 
                  font-size:18px; 
                  vertical-align:9px;color:#bbb" 
            onfocus="if(this.value == 'Job Title e.g. Assistant Manager') {
                        this.value = '';
                        this.style.color='#000';
                     }" />
    
    <input type="text" 
           name="searchterm" size="35" 
           style="background-color:white; 
                  border: solid 1px #6E6E6E;
                  height: 30px; 
                  font-size:18px; 
                  vertical-align:9px" />
    

    UPDATE:
    Since placeholder attribute is very well supported on all major browsers, there is no need to do anything manually. Its possible to achieve the same thing with this:

    <input type="text" 
           size="35" 
           placeholder="Job Title e.g. Assistant Manager" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an input text field which has style: visibility: visible or style: visibility:
I have an input text field, which has a value something by default, but
I have an input field which has a placeholder text. I want one word
I have an input field where both regular text and sprintf tags can be
I have an input text field which accepts a certain maximum number of characters.
I have a text input field which i have made readonly so the user
I have a text input field, on which when you click a json request
I have a text input field, which on DOM ready, I want to have
im trying to make my own chat... so i have an input text field,
I have a text input field like text box or text area. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.