answersLogoWhite

0


Best Answer

put his in the style section:

.back {background-image: URL(background URL 1) ;}

.back1 {background-image: URL(background URL 2 ) ;}

.back2 {background-image: URL(backgroud URL 3) ;}

Put this code to where you want to put the buttons: (don't change anything except for the button name)

Special:Wysiwyg

Special:Wysiwyg

Special:Wysiwyg

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago
  • You can use element.innerHTML="Your text here. Can contain html elements.";
  • If you just want plain text, you can use document.write(myVariable + "variable or text"); or document.writeln(); which works exactly the same but with a new line at the end.
  • All CSS styles can be accessed using element.style.position="fixed";
  • Styles that are made with a hyphen are changed to camel case (capitalise the first letter of all but the first word). element.style.marginLeft="5px";
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do we Design a webpage using javascript and HTML to do change the background image on the click of a button?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you add a click event to a java button?

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>


What is the difference between css HTML and dhtml?

* HTML is used to actually build the structure of a webpage. The text, tables, divisions, links, images, and so on. * CSS takes what HTML gives a browser, and makes it look nicer by adding color, borders, and perhaps even hiding things a user shouldn't see. * dHTML isn't a language, but a combination of HTML, CSS, and JavaScript working together. HTML builds the actual element(s), JavaScript uses scripts that makes things happen (Such as changing the colour of the background when you click a button), and CSS makes things such as changing colours actually happen (JavaScript must change the CSS, though).


How do you unlock buttons with Javascript?

HTML buttons have a property called "Disabled" which either disables (grays out) the button enables it (default). This property can be accessed through Javascript DOM by the following statement: document.getElementById("<the button ID>").disabled = true | false; Use "false" if you want to unlock a button, and "true" if you want to lock it


What is HTML code of Display text after click on submit button?

To create a button that displays text after being clicked, you can use HTML and JavaScript. Here's an example code: HTML: <button onclick="displayText()">Submit</button> <p id="text"></p> JavaScript: function displayText() { document.getElementById("text").innerHTML = "Text to display after clicking submit button."; } In this code, the button is created using the <button> tag and an onclick attribute is added to call the displayText() function when clicked. The function displayText() uses JavaScript to access the element with the ID "text" and change its innerHTML to the desired text, which will be displayed below the button.


Where is java script found in chrome to turn it on?

To enable JavaScript in Chrome, click the Menu button (to the right of the address bar) and choose "Settings". Scroll to the bottom and click "Show Advanced Settings". Under the "Privacy" heading, click the "Content settings" button. Under the JavaScript heading of the box that comes up, click "Allow all sites to run JavaScript (recommended)".

Related questions

How do you hover on the Apple iPad?

In Javascript terms, it is impossible, since you don't have a 'mouse pointer'. Pressing anywhere on a webpage that isn't a button and dragging scrolls the screen.


How do you add a click event to a java button?

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>


What is a computer background?

Usually a computer background is the image or design on the desktop. The wallpaper... Click on the background with the right mouse button and select properties or personalize to change it.


How do you activate jQuery in flash actionscript button?

Use the getURL() function to run javascript with the "javascript: " protocol. getURL("javascript: $('jquery code here');", "_self");


Why won't my answers save?

There may be a problem with WikiAnswers. Sometimes the 'Save' button does not work temporarily. Also, it may be a problem with JavaScript on your computer, as the 'Save' button works by using JavaScript.


Which button is used to prevent the browser from loading the current webpage?

There is a X button on the left of the search bar in Chrome. Pressing it will stop the loading of the current webpage.


Software that enables you to display and interact with text and other media on the web is a web .?

As you may know that website's front end is usual written in HTML and are manipulated with java script. the html and javascript have something called events. when you click on a button an event is generated and usually events are triggered by javascript and some basic events are triggered with HTML. so the software that allows you to interact with webpage is the web browser and its HTML, JavaScript processing engine


How do you disabe radio buttons on clicking a button using javascript and HTML?

radioButton.disabled=true; to disable with javascript <input type="radio" disabled> to disable it with html radioButton.disabled=false; to enable with javascript


What button in front page will let you see the webpage as it will appear in a Web browser?

The button is the preview button. It is located in the toolbar up the top and it looks like a magnifying glass. When you click it you may be prompted to save the webpage you have been working on and when you save you can see your webpage in a web browser.


What button displayS the previous webpage on toolbar?

at the top left corner, the left arrow button


How can you add a button to erase a canvas in HTML?

You need JavaScript for that purpose. You need when the button is hit, a div should hide.


What is the difference between css HTML and dhtml?

* HTML is used to actually build the structure of a webpage. The text, tables, divisions, links, images, and so on. * CSS takes what HTML gives a browser, and makes it look nicer by adding color, borders, and perhaps even hiding things a user shouldn't see. * dHTML isn't a language, but a combination of HTML, CSS, and JavaScript working together. HTML builds the actual element(s), JavaScript uses scripts that makes things happen (Such as changing the colour of the background when you click a button), and CSS makes things such as changing colours actually happen (JavaScript must change the CSS, though).