这是我到目前为止
<script>
var robot = null
}
// **启动运动
var moveRight = function(){
robot.style.left = parseInt(robot.style.left) + 10 +'px';
}
window.onload =init;
</script>
</head>
</html>
<body>
// 启动按钮转换为移动
<form>
<img id = "ted" src = "Ted.png"/>
<p>Click button to move image to right</p>
<input type = "button" value = "start" onlick = "moveRight"();"/>
</form>
答案 0 :(得分:0)
此行中有拼写错误,语法错误:
def censor(text, word):
textList = text.split()
for index, var in enumerate(textList):
if var == word:
textList[index] = "*" * len(word)
return " ".join(textList)
这是无效的JavaScript,属性称为“onclick”。试试这个:
<input type = "button" value = "start" onlick = "moveRight"();"/>