Skip to content

Instantly share code, notes, and snippets.

@outiy5
Last active May 3, 2020 16:05
Show Gist options
  • Save outiy5/b25d5be797f670b10151f179d2ed261d to your computer and use it in GitHub Desktop.
Save outiy5/b25d5be797f670b10151f179d2ed261d to your computer and use it in GitHub Desktop.

Revisions

  1. outiy5 revised this gist May 3, 2020. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion create.js
    Original file line number Diff line number Diff line change
    @@ -1 +1,10 @@
    //
    var childNode = document.createElement('p');
    childNode.innerHTML = '这里是提示信息〜〜';

    //childNode.setAttribute('class', 'alerts');
    //childNode.setAttribute('onclick', 'this.style.display = "none"');
    childNode.className = 'alerts';
    childNode.onclick = function () {
    this.style.display = 'none';
    }
    document.getElementsByTagName('body')[0].appendChild(childNode);
  2. outiy5 created this gist May 3, 2020.
    1 change: 1 addition & 0 deletions create.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    //