answersLogoWhite

0

we can do this using of javascript. you can use this following code:

<input type=button value="button" onClick=onclick_function()>

here onclick_function() is a function which is called by javascript on clicking the button. javascript code is as follows:

<script language="javascript" type="text/javascript">

// your code for onclick_function()

function onclick_function(){

alert("Welcome to javascript");

}

</script>

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

How do you add texture in buttons in java?

If you are using the Button class, you can't. java.awt.Button only allows for text to be displayed. However, if you are using the javax.swing.JButton class you can make a call to JButton.setIcon(Icon) to add an image onto your button. Example: // Let's create a new button JButton button = new JButton(); // Load the image in img.gif (this image may be a GIF, JPG, or PNG) ImageIcon icon = new ImageIcon("img.gif"); // Add the image to the button button.setIcon(icon);


How do you create an active button using flash 8?

To create an active button in Flash 8, first, draw a shape or text on the stage that will serve as your button. Select the shape or text, then right-click and choose &quot;Convert to Symbol,&quot; selecting &quot;Button&quot; as the symbol type. In the Button symbol's timeline, you can define the different states (Up, Over, Down, Hit) by using keyframes. Once your button is designed, you can place it on the main stage and add ActionScript to define its functionality, such as navigating to a new frame or triggering an event when clicked.


How do you save a notepad file into a java file?

just add an extension .java when you save your notepad text file


How do you compile program in java in scite editor?

These directions were written with the assumption you are using TextPad 5: First, you must download and install the JDK - probably the most recent one. You can download this at: http://java.sun.com/javase/downloads/?intcmp=1281 After you have successfully installed the JDK, in TextPad click on the Configure menu, and then Preferences. From the preferences screen, click on the 'Tools' heading on the left. In the tools section, click on the 'Add' button on the right, then on the 'Java SDK Commands' option, and finally on Ok. Once you've done this, you are ready to compile and run java programs. To do this, once you've opened a .java file, click on tools, external tools, and compile java. In order to run the application after you compile it, just go to tools, external tools, and run java application (or run java applet if it's an applet).


How do you deal with right click in Java Swing?

You would implement a MouseListener class like so: public class MyMouseListener extends MouseAdapter { public class MyMouseListener() {} public void mouseClicked(MouseEvent e) { if (e..getButton() MouseEvent.BUTTON3) { ; //the third button (right?) } } } Then you add in what you want to do when the correct button gets clicked. After that, you create a MyMouseListener object and register it as a MouseListener for whichever component you are trying detect events for (e.g. a pop-up menu for a JFrame).

Related Questions

How do you add an event on game maker?

this is a stupid question you can add an event by clicking the "add event" button below your list of events, or right click the event list, select add event, then choose the event you would like to add.


When you click on Unanswered questions on your homepage how do you add an answer?

just click the button "answer it"..... its the orange button.


Where is the Internet Explorer safety button?

Right click on the command bar, then click on "customize" and then "add or remove commands". Add the safety button to the command bar.


How do you add people on moshi monsters?

Go onto your friend's tree and click on 'add friend'. When the picture comes up click on 'add'. Click on the friend then click the button that says 'add me'.


How do you add someone on YouTube?

If you want to subscribe to somebody, click the 'subscribe' button above one of their videos, or click on their name and click 'subscribe' on their channel. If you want to add them as a friend, just click on their name and then on 'add as friend'. This button should be right next to the 'subscribe' button, and right next to their channel picture.


When using Microsoft Outlook Calendar in what view can the New Button be used to add an appointment?

Firstly click into events, once the page has come up click new then you should be able to. Or there might be something saying add new event or something like that... :)


How do you add an event on new Habbo?

In the bottom right top search for Details. Then click there and it will pop something. Then search New Event. Click there , write your event info and click START event.


How do you get on mickie James MySpace page?

click the 'add' button


How do you add stuff to your trading list animal jam?

you click the + button and then add the thing


How to add a comment to an answer on WikiAnswers?

If you have something to add to the answer, click on the Improve Answer button. If you have a comment or want additional information, click on Discuss Question.


How do you add .jar files in java?

1) GO to properties of the project. 2) click on deployment assembly . 3) click on add external jar. 4) browse from the directory. 5) click select


How do you make page your homepage?

click on your homepage button, go down to add or change, and add it!