$("#submit").click(function(){
var name = $('#name').val();
var note = $('#note').val();
var data = '<h3>' + name + '</h3>' + '<p>' + note + '</p>';
console.log(data);
});
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<form role="form" method="POST" id="reused_form">
<div class="row">
</div>
<div class="row">
<div class="col-sm-6 form-group">
<label for="name"> Your Name:</label>
<input type="text" class="form-control inputVal" value="" id="name" name="name" required>
</div>
<div class="row">
<div class="col-sm-12 form-group">
<label for="comments"> Note:</label>
<textarea class="form-control inputVal" type="textarea" name="note" id="note" placeholder="Write Somthing" maxlength="6000" rows="7" value=""></textarea>
</div>
</div>
<div class="row">
<div class="col-sm-12 form-group">
<button type="submit" class="btn btn-lg btn-warning btn-block" name="submit" id="submit">Submit </button>
<button type="button" class="btn btn-lg btn-warning btn-block" name="reset" id="reset" onclick="clearLocalStorage()">Reset </button>
</div>
</div>
</form>
</div>
</div>
</div>
尝试这个
var name = $('#name').val();
var note = $('#note').val();
var data = '<h3>' + name + '</h3>' + '<p>' + note + '</p>';