阅读682 返回首页    go 阿里云 go 技术社区[云栖]


js中insertAdjacentHTML的用法

<div   id=mxh>原来的</div>  

  <input     type=button   value="Insert   Before">  

  <input     type=button   value="Insert   Before   End">

参数有两个,第一个:插入位置;第二个:插入内容;  

  第一个参数的意义:  


  [插在这里,值为"beforeBegin"]<div   id=test>[插在这里,值为"afterBegin"]    

    层内文字    

  [插在这里,值为"beforeEnd"]</div>[插在这里,值为"afterEnd"]   

最后更新:2017-04-03 14:53:58

  上一篇:go 引用传实参
  下一篇:go GetWindowRect、GetClientRect、ScreenToClient与ClientToScreen