JS多个矩形块选择效果代码(模拟CS结构)
全选注:引⼊外部Js需再刷新⼀下页⾯才能执⾏]
cache" http-
equiv="pragma"/> <meta
content="no-cache" http-
equiv="cache-control"/>
<meta content="0" http-
equiv="expires"/> <meta
content="keyword1,keyw
ord2,keyword3" http-
equiv="keywords"/>
<meta content="This is
my page" http-
equiv="description"/>
<link href="
<%=path%>/css/font.css"
rel="stylesheet"
type="text/css"/> <script
language="JavaScript">
var canChange = 1; var
candraw = 1; function
main_mouseup() {
candraw = 0; } function
init() { var aDivs =
yTagName("div"); for (var
i=0; i<aDivs.length; i++) {
new
neverDragDivision(aDivs
[i]); } } function
changeColorToSelected(
id) { id1=""+id; var td
=ElementB
yId(id1); td.bgColor =
"#0000C6"; } function
changeColorToNotSelec
ted(id) { id1=""+id; var td
=ElementB
yId(id1); td.bgColor =
"#BEBEBE"; } function
changecolor(id) {
代码运行js特效if(canChange == 1) {
if(id<1000) { id1=""+id;
var td
=ElementB
yId(id1); var str =
td.bgColor; //alert(str); var
str1 = "#bebebe"; //⿊⾊
var str2 = "#008000"; //绿
⾊ if(str == str1) {
td.bgColor = "#0000C6";
//red说明这个位置可以
放! // ps[id] = 1; } else {
//ps[id] = 0; td.bgColor =
"#BEBEBE"; } } else {
id1=""+id; var td
=ElementB
yId(id1); var str =
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论