怎么通过js清空div中的内容

JavaScript08

怎么通过js清空div中的内容,第1张

document.getElementById('BIGDraw').innerHTML = ""

$('#BIGDraw').html("")

清空div内容 两种都可以

<html>

<head>

<script type="text/javascript">

function clearinput()

{

var sss = document.getElementById("sss") 

 for(i=0i<sss.getElementsByTagName("input").lengthi++){  

          sss.getElementsByTagName("input")[i].value=""  

    } 

}

</script>

</head>

<body>

<div id="sss">

<input type="text" >

<input type="text" >

<input type="text" >

<input type="text" >

</div>

<input type="button" value="清空" onclick="clearinput()">

</body>

</html>