求教这个错在哪?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>js动画制作</title>
<style type="text/css">
#div1{
width:200px;
height:200px;
border:2px solid red;
position:absolute;
left:0px;
top:50px;
}
</style>
<script type="text/javascript">
function startqwe(speed){
var qwe=document.getElementById('div1');
var speed=document.getElementById('txt1').value;
setInterval(function(){qwe.style.left=qwe.offsetLeft+speed+'px';},1000);
</script>
</head>
<body>
<div id="div1"></div>
设置速度<input type="text" id="txt1" />px/s
<input type="button" value="点击开始运动" style="position:relative;" onclick="startqwe(speed)" />
</body>
</html>
想设计一个自定义速度的运动结果没有反应麻烦大神看下谢谢