I need to change the var text into an array and explode it with "\n".Please help me
<html>
<head>
</head>
<body>
<form id="web2lead" action="">
<div>
<label for="txtName" class="addtocomment">Name </label>
<input type="text" id="txtName" class="addtocomment" name="txtName"><br>
<label for="txtEmail" class="addtocomment" id="txtEmail">E-mail </label>
<input type="text" id="txtEmail" class="addtocomment" name="txtEmail"><br>
<label for="txtAddress" class="addtocomment">Address </label>
<input type="text" id="txtAddress" class="addtocomment" name="txtAddress"><br>
<!--<input type=hidden name="hiddenbox" value="" id="hiddenbox"><br>-->
<input type="submit" value="Go">
</div>
<script>
$(document).ready(function(){
$('#web2lead').on('submit', function(e){
e.preventDefault();
$('input.addtocomment').each(function(){
var text =$("label[for='"+this.id+"']").attr('for')+ $(this).val();
});
});
});
</script>
</form>
</body>
</html>