閱讀682 返回首頁    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