Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- document.div.style.background = 'url(second_1.jpg) no-repeat';
- function new_art() {
- document.div.style.background = 'url(second_1.jpg)';
- }
- div {
- background: url(first_1.jpg) no-repeat;
- width: 15%;
- height: 87%;
- }
- div:hover {
- background: url(first_2.jpg);
- }
- <div></div>
- <input type="button" value="Tap me!" onclick="new_art()">
Add Comment
Please, Sign In to add comment