• Sign in
  • Sign up 
  • Welcome
  • FAQ
  • Block Explorer 
  • Dark Mode
  • Stolen Accounts Recovery 
  • Change Account Password 
  • Vote for Witnesses 
  • Hive Proposals 
  • OpenHive Chat 
  • Developer Portal 
  • Hive Whitepaper 
  • Privacy Policy
  • Terms of Service
logo
  • Posts
  • Proposals
  • Witnesses
  • Our dApps
LoginSign up
You are viewing a single comment's thread from:

RE: JavaScript开发笔记

  • View the full context
lemooljiang (75)in #starnote • yesterday

js删除dom节点或div

<div id="img1">
  图片1
<input  type="button" onclick="del('img1')" value="删除元素"/>
</div>

<script>
function del(divId){
  document.getElementById(divId).remove()
}
</script>
yesterday in #starnote by lemooljiang (75)
$0.00
    Reply 0
    Sort:  
  • Trending
    • Trending
    • Votes
    • Age