答案 0 :(得分:0)
使用angularJS
<强>控制器强>
// your first input data
$scope.country1 = "";
// your second input data
$scope.country2 = "";
// the copy function
$scope.copy = function() {
$scope.country2 = $scope.country1;
}
查看强>
<!-- Your first input -->
<input type="text" ng-model="country1" ng-model-options="{ debounce: 1000 }"/>
<!-- Your button -->
<button ng-click="copy()">Copy</button>
<!-- Your second input -->
<input type="text" ng-model="country2" ng-model-options="{ debounce: 1000 }"/>