如何通过js创建div并同时设置div的id?<script>var oDiv = document.createElement('div')oDiv.id = 'div1'document.body.appendC2023-04-15JavaScript260