Advertisement
lemansky

Untitled

Nov 12th, 2020
994
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.53 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>Document</title>
  6.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7.     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
  8.     <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
  9.     <script>
  10.         document.addEventListener('DOMContentLoaded', function(event){
  11.             clean(document.body);
  12.  
  13.         });
  14.         const clean = (node) =>
  15.         {
  16.           for(var n = 0; n < node.childNodes.length; n ++)
  17.          {
  18.            var child = node.childNodes[n];
  19.            if
  20.            (
  21.              child.nodeType === 8
  22.              ||
  23.              (child.nodeType === 3 && !/\S/.test(child.nodeValue))
  24.            )
  25.            {
  26.              node.removeChild(child);
  27.              n --;
  28.            }
  29.            else if(child.nodeType === 1)
  30.            {
  31.              clean(child);
  32.            }
  33.          }
  34.        }
  35.     </script>
  36. </head>
  37. <body>
  38.     <div class="container">
  39.         <div class="row">
  40.             <div class="form-group form-inline m-3">
  41.               <label for="a1">Добави още Падинг</label>
  42.               <input type="text" class="form-control mx-3" id="a1" placeholder="Падинг">
  43.               <button type="button" class="btn btn-primary">Добави</button>
  44.             </div>
  45.         </div>
  46.     </div>
  47. </body>
  48. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement