Skip to content

Instantly share code, notes, and snippets.

@onkar-singh
Created September 6, 2018 16:45
Show Gist options
  • Save onkar-singh/abac2867525d86b529b4d0ece7acb2b0 to your computer and use it in GitHub Desktop.
Save onkar-singh/abac2867525d86b529b4d0ece7acb2b0 to your computer and use it in GitHub Desktop.

Revisions

  1. onkar-singh created this gist Sep 6, 2018.
    132 changes: 132 additions & 0 deletions html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,132 @@

    ftp://192.168.1.23:3721/

    var X = document.getElementById("intro");
    var x = document.getElementsByTagName("p");
    var x = document.getElementsByClassName("intro");
    var x = document.querySelectorAll("p.intro");


    element.innerHTML = new html content || Exam:- object.innerHTML/.innerText/.textContent = "<p>Dog</p>";
    element.attribute = new value || Exam:- object.src = "landscape.jpg"; element.style.property=newstyle || Exam:- object.style.color="blue";
    element.setAttribute(attribute, value) || Exam:- object.setAttribute("style", "background-color: red;"); element.removeAttribute(attributename) || Exam:- object.removeAttribute("href");

    var element = document.getElementById("div1");
    element.classList.add("otherclass");

    element.classList.remove("otherclass");

    var d = document.getElementById("div1");
    d.className += " otherclass";



    <p>Click the button to open a new window called "MsgWindow" with some text.</p>

    <button onclick="myFunction()">Try it</button>

    <script>
    function myFunction() {
    var myWindow = window.open("", "MsgWindow", "width=200,height=100");
    myWindow.document.write("<p>This is 'MsgWindow'. I am 200px wide and 100px tall!</p>");
    }
    </script>

    document.body.innerHTML="<h2>Learning about the HTML DOM is fun!</h2>";
    document.getElementById("parentID").innerHTML

    document.addEventListener('contextmenu', event => event.preventDefault());

    body {
    -webkit-user-select: none; /* Chrome all / Safari all */
    -o-user-select: none;
    user-select: none;
    -webkit-touch-callout:none;
    }

    <body oncontextmenu="return false;">


    <button onclick="myFunction()">Try it</button>
    <p id="demo"></p>

    <script>
    function myFunction() {
    var w = window.innerWidth;
    var h = window.innerHeight;
    document.getElementById("demo").innerHTML = "Width: " + w + "<br>Height: " + h;
    }
    </script>

    .blurcss{
    filter: blur(10px); /// filter:drop-shadow(8px 8px 10px gray);
    }

    Microsoft Windows [Version 6.3.9600]
    (c) 2013 Microsoft Corporation. All rights reserved.

    C:\Users\Onkar Singh>cd ..

    C:\Users>cd ..

    C:\>cd mongodb

    C:\mongodb>cd bin

    C:\mongodb\bin>mongod --directoryperdb --dbpath c:\mongodb\data\db --logpath c:\
    mongodb\log\mongo.log --logappend --rest --install

    C:\mongodb\bin>mongod --directoryperdb --dbpath c:\mongodb\data\db --logpath c:\
    mongodb\log\mongo.log --logappend --rest --install

    C:\mongodb\bin>mongod --directoryperdb --dbpath c:\mongodb\data\db --logpath c:\
    mongodb\log\mongo.log --logappend --rest --install

    answered
    background-position: -7px -55px;
    float: left;
    height: 26px;
    line-height: 20px;
    margin-right: 10px;
    width: 29px;
    color: #fff;
    padding-top: 3px;

    not ansedred
    background-position: -42px -56px;
    float: left;
    height: 26px;
    line-height: 22px;
    margin-right: 10px;
    width: 29px;
    color: #fff;

    not visited
    background-position: -107px -56px;
    float: left;
    height: 26px;
    line-height: 21px;
    margin-right: 10px;
    width: 29px;
    color: #000;
    padding-top: 2px;
    mark as re
    background-position: -75px -54px;
    float: left;
    height: 28px;
    line-height: 18px;
    margin-right: 10px;
    width: 28px;
    color: #fff;
    padding-top: 5px;

    mark aswered
    background-position: -172px -55px;
    float: left;
    height: 28px;
    line-height: 15px;
    margin-right: 10px;
    width: 30px;
    color: #fff;
    padding-top: 5px;