大家好我想解决这个问题我希望inputFeild2通过jquery更改inputEild1从jquery获取值。我只想在inputFeild1从jquery
返回值时获取该事件$("#inputFeild").change(function() {
//some code value returned to the form "inputFeild1"
}
<input type="text" name="inputFeild" id="inputFeild" />
<input type="text" name="inputFeild1" id="inputFeild1" />
<input type="text" name="inputFeild2" id="inputFeild2" />
答案 0 :(得分:0)
你的问题仍然很不清楚但如果你想让inputFeild2与inputFeild1具有相同的值,那么你可以这样做:
$('#inputFeild1').change(function() {
$('#inputFeild2').val(this.value);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
Input feild 1: <input type="text" name="inputFeild1" id="inputFeild1">
Input feild 2: <input type="text" name="inputFeild2" id="inputFeild2">