Share on Google+Share on Google+

rashmi yadav
button tag
4 Answer(s)      6 years and 4 months ago
Posted in : HTML

how do i change button color to black. meant to say i want black button with white text on it

Ads

View Answers

December 24, 2010 at 2:50 PM


Hi Friend,

Try the following code:

<html>
<script>
function getMes(){
var message=document.getElementById('msg').value;
alert(message);
}
</script>
<body>
Enter Message: <input type="text" id="msg"><br>
<input type="button" value="Submit" style="background-color:black; color:white;" onclick="getMes();">
</body>
</html>

Thanks



December 24, 2010 at 3:03 PM


thanks for your reply. i could do it in this way

<button style="background-color:black"> text</button>

now my question is i have say 4 buttons arranged in 2X2 matrix i need to navigate among them using arrow keys how do i do it. now i have tab navigation. but i want arrow key navigation.



December 24, 2010 at 3:27 PM


how do i post code snippet?



December 24, 2010 at 3:31 PM


<button style="background-color:black;width:160;height:120;>text </button>

but this code will not resize the button why?










Related Tutorials/Questions & Answers:
button tag
button tag  how do i change button color to black. meant to say i want black button with white text on it   Hi Friend, Try the following... Message: <input type="text" id="msg"><br> <input type="button" value
HTML5  button tag, Implementation of button &lt;button&gt;tag.
HTML5  button tag, Implementation of button <button>tag. Introduction: In this section, we will introduce you to the button <button> tag. Button tag is used for showing button on screen or at browser. It is a pair
Advertisements
Button
Button  How to use image for button in JSF
button
button  can i give multiple commands on click of a button? if yes how can i do that?? multiple commands can we retriving dat from database, capturing data, moving to next page.. etc
button
button  can i give multiple commands on click of a button? if yes how can i do that?? multiple commands can be retriving dat from database, capturing data, moving to next page.. etc
HTML5 button tutorial, Example of form and formaction attribute of button.
the use of form and formaction attribute of button tag. If form attribute presents in button. It specifies related form. The action attribute of form tag...;nbsp; button tag in HTML5.</b></p> <form id="form1
Struts2.2.1 radio Tag Example
Struts2.2.1 radio Tag Example The radio tag is a UI tag that render a radio button input field. The following Example will shows how to implement the radio tag in the Struts2.2.1 -- First we create a JSP file named RadioTag.jsp
JSF commandLink Tag
JSF commandLink Tag      This section illustrates you about the JSF commandLink tag which is rendered as a anchor tag. And this tag behaves as a command button
JSF commandButton Tag
JSF commandButton Tag      This section illustrates more about commandButton tag in JSF. This tag renders an HTML submit button. This button can
Enabling and Disabling Button In JSF
Enabling and Disabling Button In JSF  ...; In this tutorial enabling and disabling a button on different conditions has been explained. A button can be disabled setting "disabled"
wnidows button
wnidows button   How to handle windows back and forward button in struts applications, without using java script
radio button
radio button  On selecting a radio button, it should open a aspx page
Style in button
Style in button  Hi.... How can I set the button width with fx:style... of the button will not set by the style because it is the property of the button not the style property of the button. Thanks
html button
html button  when i click the submit button the entered data will be displayed below the submit button please help me
Back button
Back button  how to redirect to a home page when a back button is pressed in jsp instead of displaying the previous page
create a button
create a button  i have created button inhtml but my jsp is not working,so can u guide me
flogin button
flogin button  how to pass redirctt url for flogin button...and to retrieve parameters that are passed in that url..to store in our database
coding of button
coding of button  What is code of fetching the value of button in a textbox using javascript
Tomahawk dataTable tag
Tomahawk dataTable tag          This tag is used... of component like input text box, output text, command button etc.<h
uikeyboard done button/return button
uikeyboard done button/return button  Hi everyone!!! Just worried about ..how to return the UIKeyboard on done or return button click in my iPhone... to return the uikeyboard on done button click. Do not forget to call <
button in java
button in java  how can i compare names of two buttons after...) { System.out.println("button clicked"); } } Thanks   Hi.... i want to keep the labels on the button same yet identify them individually
UIButton sender tag
UIButton sender tag  Hi, How to get the tag of button? I have several buttons and one event is mapped to all the buttons, I want to get the UIButton sender tag. Thanks
UIButton sender tag
UIButton sender tag  Hi, How to get the tag of button? I have several buttons and one event is mapped to all the buttons, I want to get the UIButton sender tag. Thanks
submit button
submit button  <p>hi I am trying to insert record in database using hibernate in JSP(Netbeans). When I click insert button it should go to insert.java class but fails to go.</p> <ul> <li><p>
Tomahawk commandLink tag
Tomahawk commandLink tag      This tag behaves like a command button in a form. This tag can also be used for the event handling purposes through the backing bean. This tag
UIButton sender tag
with the help of tag id of the button? Thanks   HI, You can typecast the sender object into button and then get the tag. Following code show how to do...* myButton = (UIButton*)sender; NSLog(@"Button Tag is: %d",myButton.tag
tag handler
tag handler  what is the diff bt simple and classic tag? which is more benifit to implement the handler? can we make use of any of these two to imlement the tag handler
Query on radio button
Query on radio button  I am having a multiple row in jsp page.They are dynamically coming. For each row there is one radio button. I want to select... are displayed in the jsp page using bean tag. Please provide me some suggestion
changing selection color of <button>
changing selection color of   dear all, i have loaded image in border less button tag when button is selected with tab key i get brown color... valign=middle > <figure> <button style="background-color:black
Expression tag
Expression tag  Defined Expression tag in JSP ?   Expression tag is used to display output of any data on the generated page. The data placed in Expression tag prints on the output stream and automatically converts
Struts2 tag
Struts2 tag  function of hidden tag?   Hi Friend, <s:hidden> tag create a hidden value field.It means it stores the value but cannot be visible. For more information, visit the following link: Struts2 Tutorial
Tutorials   
Java Spring Hibernate Struts Training How to display button as a link in vaadin? hi change navbar dropdown color in bootstrap How to remove the background color of bootstrap menu bar? How to change color of opened Bootstrap drop down toggle? Setting bootstrap container background color Help school all activities and admision process.. add one row after another date make a webpage HTMl HTMl Source code how to apply globalisation to a world wide asp.net application how to print HTML using javascript or Jquery How to recover from google panda update? How to survive google panda 4.0 update How to find if you have been hit by Panda 4.0 Design a web page using XHTML and JavaScript that does the followings: ffmpeg converting file mp4 to mov JavaScript How to Disable Catch-all Emails on CPanel z-index always on top What is Web hosting Database and HTML web development trainee Uploading files Image Gallery Image Gallery dropdown How to redirect from a HTML page? Easiest method for expiring the css and js headers HTML WITH AJAX VB 6 Read Web Page Header string palindrom using vbscript? html button How to add mod_deflate to apache without recompiling How to use place hoder in IE(version : 8) Html Software Question div align left css Fetching data from excel file on other website and display in interactive graph form where do I find the fix for tree view catalog not expanding and collapsing correctly for roseindia shopping cart 1.1 pass to next page to enter into a particular page only if the username,password and listbox value mtches hi Cricket stadium ticket booking design Need some help creating an order form. HTML div tag HTML div tag

Ads

 
Advertisement null

Ads