CoursInformatique/Images/.svn/text-base/AnimationJavascript1.html.svn-base
2019-12-12 22:25:13 +01:00

32 lines
904 B
XML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta name="GENERATOR" content="Quanta Plus" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
/* <![CDATA[ */
/* ]]> */
</style>
<script type="text/javascript">
/* <![CDATA[ */
function deplace(){
identification = document.getElementById('robot')
position = parseInt(identification.style.left)
position = position + 10
identification.style.left = position+"px"
}
/* ]]> */
</script>
</head>
<body>
<img src='tux.png'/>
<img id='robot' src='robot.gif' style="position: absolute; top: 100px; left: 300px"/>
<br/><br/>
<button onclick='deplace()' onkeypress="deplace()">Déplacer</button>
</body>
</html>