BeginnersBook.in

Programming For Geeks

  • Home
  • All Tutorials
    • Learn C
    • Learn Python
  • Programs
    • Java Programs
    • C++ Programs
    • C Programs
  • Algorithms
    • Sorting
  • MCQ’s
    • MySQL
    • Operating System
  • WordPress
    • Genesis Pro Themes
    • Blogs
  • Tools
    • Direct Download Link Generator
    • HTML Compiler
  • How to
    • Web Examples
  • Write For Us

How to Clear Input Field Using on Focus and JavaScript

May 23, 2018 By Mr. Robot

Learn How to Clear Input Field Using on Focus and JavaScript.


Click on the input filed to clear text.


Clear input Field onFocus()


Clear input Field Using JavaScript


Click on the button to clear the text


Clear input Field Using External JavaScript

Step 1) Add HTML


Step 2) Add JavaScript


Complete Code

Try it Yourself! »

Filed Under: HTML, JavaScript

Related Posts

  • How To Create a Responsive Countdown Timer
  • How To Create a Typing Effect
  • How to Zoom on Hover With CSS

Recent Posts

  • Download Grand Theft Auto: Vice City Audio File | Highly Compressed
  • Grand Theft Auto: Vice City Game Download For PC | Full Setup
  • SQL SHOW DATABASES Statement
  • Direct view storage Tube (DVST) in Computer Graphics
  • CRT Color Monitor in Computer Graphics

How to – Web Examples

  • Copy Text to Clipboard
  • Load text to Textarea
  • Save Textarea code
  • Validation Examples
  • Typing Effect
  • Toggle Password - JS
  • Toggle Password - jQuery
  • Alert Box
  • Clear Input Field
  • Create Digital Clock
  • CSS Notes
  • Hover over text
  • Create Countdown Timer
  • Alert buttons
  • CSS3 Loading Bars

Copyright © 2019 - BeginnersBook.in - All Right Reserved || Sitemap