title: Javascript insert element into next table td without using ID, Name etc
body: <p>I want to input some <code>&lt;p&gt;NewText&lt;/p&gt;</code> into next td after there was some keyup at previous td's input. For example, if the input text field is in the table's second td, then after I make some keyup some <code>&lt;p&gt;NewText&lt;/p&gt;</code> appears into the table's third td. I want to get it done without ID, Names, Classes etc.</p>
  
  <p>The problem in my code is that <code>&lt;p&gt;NewText&lt;/p&gt;</code> inserts between second and third td. I don't know how to put inside the third td.</p>
  
  <p><img src="https://i.stack.imgur.com/9IxkV.jpg" alt="enter image description here"></p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;td&gt;Text&lt;/td&gt;
          &lt;td&gt;&lt;input type="text" onkeyup="scripts(this)" /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>function scripts($this) {
      $this.parentNode.nextSibling.innerHTML = '';
  
      if ($this.value !== '') {
          $("&lt;p&gt;NewText&lt;/p&gt;").insertAfter($this.parentNode);
      };
  };
  </code></pre>