删除然后再次设置背景图像 [英] removing and then again setting background image

查看:89
本文介绍了删除然后再次设置背景图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Java脚本删除并再次应用背景图像,以及如何同时更改文本和背景的颜色.



how to remove and then again apply background image using java script and in addition changing color of text and background also.



<html>
<head>
<title>Text Color Change</title>
<script type="text/javascript" src="JScript.js"></script>
</head>
<body>
<div id="bg">
</div>
<div id="b1">
<h1>This is for Text Color and background color change</h1>
<button id="Btn1" type="button" onclick="changecolor()">
Click Me to change text-color</button>
</div>
<div id="b2">
<button type="button" onclick="changeBackground()">
Change the background </button>
</div>
<div align="right">
<button type="button" onclick="clearimage()">
Remove Image</button>
</div>
</body>
</html>

推荐答案

使用jQuery进行CSS操作
http://api.jquery.com/css/ [
Use jQuery for css manipulation
http://api.jquery.com/css/[^]


如何使用Java脚本删除背景,然后再次应用背景图片,以及更改颜色也包括文字和背景.

how to remove and then again apply background image using java script and in addition changing color of text and background also.

<script type="text/javascript" src="jquery-1.8.2.js"></script>

<script type="text/javascript">

//using jQuery


(

这篇关于删除然后再次设置背景图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆