how to send a command in js

JavaScript
<form action="">
  <select name="channel">
   <option value="#channel1">channel1</option>
   <option value="#channel2">channel2</option>
  </select>
 </form>
Source

Also in JavaScript: