title: How to split the Response html of ajax in jquery
body: <p>This code is working fine. But i could not spilt the response of html using ajax jquery. i need to split it to #div1 and #div2. Please Use "|" to split response. please explain with full code. because i don't have much knowledge about jquery.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function(){
      $("button").click(function(){
          var Names = $('#Names').val();//alert(Names);
          var ArrNames = Names.split(",");
          var Name1 = ArrNames[0];//alert(Name1);
          var Name2 = ArrNames[1];//alert(Name2);
          $("#div1").load('result.php', {
              "FirstName": Name1,
              "SecondName": Name2
          });
          return (false);
      });
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div style="float:left;"&gt;&lt;b&gt;Response Data1:&lt;/b&gt;&lt;/div&gt;&lt;div id="div1" style="float:left;"&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
  &lt;div style="clear:both;"&gt;
  &lt;div style="float:left;"&gt;&lt;b&gt;Response Data2:&lt;/b&gt;&lt;/div&gt;&lt;div id="div2" style="float:left;"&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
  &lt;div style="clear:both;"&gt;
  &lt;form&gt;
  &lt;input id="Names" type="text" value="name1,name2"&gt;
  &lt;button&gt;Event&lt;/button&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>this is result.php</p>
  
  <pre><code>&lt;?php
         $name1 = $_REQUEST['FirstName'];
         $name2 = $_REQUEST['SecondName'];
  
  // i need to split by | this symbol;
      ?&gt; 
  
  &lt;input type="text" value="This is 1st response &lt;?php echo $name1;?&gt;"&gt; | This is 2nd Response &lt;?php echo $name2;?&gt;
  </code></pre>