Home » Javascript » Website function that creates folders and files with a click of a button

Website function that creates folders and files with a click of a button

Posted by: admin August 12, 2018 Leave a comment

Questions:

I had this idea to make a website that creates folders and files that I can specify the name of with inputs. I have powershell done til that point that I can create a folder but I cannot specify the name with inputs in html.

The question is if it is any “function” in powershell that is more like getElementByID() from js?

This is the code I have:

<body>
    <form>
          <input type="text" id="folderName" placeholder="Folder name">
          <input type="submit" name="" onclick="createFolder" value="Create">
    </form>
    <script>
           function createFolder {
               mk dir getElementById('folderName')
           }
    </script>
</body>

I am completely new to powershell and would like some help!

Answers: