How To Make A Html Button Clickable And To Show Alert On It

Skip to ContentProfile image of boardcoder79619Submitted by boardcoder79619almost 13 yearsHow to make a html button clickable and to show alert on it ?

Sorry eric, now it is working fine…i tweeted on you for that hahaha… Anyways answer my question someone pls

Answer 5133cf688a3c6900530010c0

0 votes

Permalink

Do you mean for the button to pop up an alert when clicked or for the button to have “alert” written on it? Here’s both:

<script> function clickAlert() { alert("Alert!"); } </script> <input type="button" onclick="clickAlert()" value="Click-2-Alert"> Profile image of napowitzuSubmitted by napowitzualmost 13 years

Answer 5138e501cb4e9670600066cc

0 votes

Permalink

May be it will help you….

<head> <script type="text/javascript"> function conf() { var con=confirm("Do you want to submit for sure?"); } </script> </head> <body> <form><input type="submit" onClick="conf()"/></form> </body> Profile image of anantajitjgSubmitted by anantajitjgalmost 13 years

Popular free courses

  • Free course

    Learn SQL

    In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.
    • Checker DenseBeginner Friendly.4 Lessons
  • Free course

    Learn JavaScript

    Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.
    • Checker DenseBeginner Friendly.11 Lessons
  • Free course

    Learn HTML

    Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.
    • Checker DenseBeginner Friendly.6 Lessons
Explore full catalog

Từ khóa » Html Js Alert Button