我收到错误:
SyntaxError: missing ) after argument list
使用此javascript:
<script type="text/javascript">
function selectRoom(roomName, planId, taskId) {
document.getElementById().className = roomName;
}
</script>
这个错误是什么意思?
答案 0 :(得分:-1)
function selectRoom(roomName, planId, taskId) {
document.getElementById('xyz').className = roomName;
}
其中xyz是您的DOM ID。即元素的ID