Node.js Express Text Splitter By Space,Comma and Semicolon Online Tool Made in Javascript Using Split Method 2020

Node.js Express Text Splitter By Space,Comma and Semicolon Online Tool Made in Javascript Using Split Method 2020

 

 

Welcome folks today in this tutorial we will be making a text splitter tool made in javascript using split method. All the source code of application is given below

 

 

Live Demo

 

 

You can see the live demo of text splitter here

 

 

Get Started

 

 

In order to get started we need to create the index.html and copy paste the following code

 

 

!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Static Template</title>
  </head>
  <body>
    <h1>
      This is a static template, there is no bundler or bundling involved!
    </h1>
    <textarea
      name=""
      id="text"
      placeholder="Enter Text"
      required
      cols="20"
      rows="10"
    ></textarea>
    <button id="button">Convert</button>
    <textarea
      name=""
      id="code"
      placeholder="Ascii Code"
      cols="20"
      rows="10"
    ></textarea>
  </body>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

  <script>
    $("#button").click(function () {

     //$("#code").val("")
      

      var text = $("#text").val();

      var arraya = text.split("-");

      for (var i = 0; i < arraya.length; i++) {
        $("#code").append(arraya[i]);
        $("#code").append("\n");
      }


    });
  </script>
</html>

 

See also  Build a Greedy Snake Game in Browser Using HTML5 CSS3 and Javascript Full Project For Beginners

 

 

Screenshot

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Leave a Reply