cyber,
317 с двумя запусками ...
Вариант
Цитата:
|
Написано символов: 283
|
<!DOCTYPE HTML>
<html>
<head>
<title></title>
<style type="text/css">
div{
background-color: #FFFF00;
}
</style>
</head>
<body>
<div id = 'edittemplate' >
1234567890 id = 'edittemplate'
</div>
<div id = 'resize' >
1234567890 id = 'resize'
</div>
<div id = 'reduce' >
1234567890 id = 'reduce'
</div>
<div id = 'increase' >
1234567890 id = 'increase'
</div>
<script language="JavaScript" type="text/javascript">
//function reduceBlock(b){var c=["850px","inline","850px","none"];b&&(c=["1150px","none","1150px","inline"]);b=["edittemplate","reduce","resize","increase"];for(var d=["width","display"],a=0;a<b.length;a++)document.getElementById(b[a]).style[d[a%2]]=c[a]}reduceBlock(1);reduceBlock(0);
function reduceBlock(b) {
var c = ["850px", "inline", "850px", "none"];
b && (c = ["1150px", "none", "1150px", "inline"]);
b = ["edittemplate", "reduce", "resize", "increase"];
for (var d = ["width", "display"], a = 0; a < b.length; a++)
document.getElementById(b[a]).style[d[a % 2]] = c[a]
}
reduceBlock(1);
reduceBlock(0);
</script>
<br />
<input type="button" name="" value="1" onclick="reduceBlock(1)"/>
<input type="button" name="" value="0" onclick="reduceBlock(0)"/>
</body>
</html>