JSFiddle - React, Tailwind, and code Playground

by rahulr

HTML

<div id="all">
<input id="txtbox" type="text" Height="100px" style="width:400px"  />   
  <input id="Checkbox2" type="checkbox" value="[email protected]" />
  <input id="Checkbox3" type="checkbox" value="[email protected]" />
  <input id="Checkbox4" type="checkbox" value="[email protected]" />
  <input id="Checkbox5" type="checkbox" value="[email protected]" />

</div>

JavaScript

function updateTextArea() {
        var allVals = [];

    $('#all :input').click(function () {
        var email=$(this).val();

        $('#txtbox').val(function(index, val) {  
        return val + email+",";
        });
            });
    }
    $(function () {
        $('#all input').click(updateTextArea);
        updateTextArea();
    });