|
|
|
|
|
для: cheops
(04.07.2005 в 03:02)
| | благодарю,cheops,то что нужно! | |
|
|
|
|
|
|
|
для: servannin
(04.07.2005 в 01:49)
| | Примерно, так
<html>
<head>
<style>
.css1 {background:red;}
</style>
<script language="JavaScript">
<!--
var id;
function moveTxt(id)
{
id = event.srcElement.id;
move(id);
}
function move(id)
{
if (document.getElementById(id).style.pixelTop < 300)
{
document.getElementById(id).style.pixelTop +=25;
document.getElementById(id).style.pixelLeft -=25;
setTimeout ("move('" + id + "')", 100);
}
}
-->
</script>
</head>
<body >
<div id="z" style="position:absolute;left:400;top:5" class="css1" onclick="moveTxt('z')" >softtime :)</div>
</body></html>
|
| |
|
|
|
|
|
|
| как убрать ошибку ?
<html>
<head>
<style>
.css1 {background:red;}
</style>
<script language="JavaScript">
<!--
var id;
function moveTxt(id)
{
id = event.srcElement.id;
if (document.getElementById(id).style.pixelTop < 300)
{
document.getElementById(id).style.pixelTop +=25;
document.getElementById(id).style.pixelLeft -=25;
setTimeout ("moveTxt(id)", 100);
}
}
-->
</script>
</head>
<body >
<div id="z" style="position:absolute;left:400;top:5" class="css1" onclick="moveTxt(id)" >softtime :)</div>
</body></html>
|
| |
|
|
|
|