JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" type="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">

<br>
First Name: <input type="text" id="txt1" value="123" /><br />
Last Name:        <input type="text"  id="txt2" /><br />
       Address 1: <input type="text" id="txt3" /><br />
     Address 2:   <input type="text" id="txt4" /><br />
        City: <input type="text"  id="txt5" /><br />
        State: <input type="text" id="txt6" "/><br /><br />
<br>
        <div id="button" class="btn">Get ids of blank text boxes</div><br />

<a href="#">Click to from this site</a>

JavaScript

$(function() {

$('a').click(function() {

var emptyTextBoxes = $('input:text').filter(function() { return this.value != ""; });

emptyTextBoxes.each(function() {

string =  this.name;

});

alert(string);

});


});