你好,我帮你写了一个简单的例子:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Copy Value</title>
</head>
<body>
<style>
</style>
<input type="text" name="" id="J_From">
<input type="button" value="添加" id="J_Add">
<input type="text" name="" id="J_To" readonly>
<script>
(function(){
var f = document.getElementById('J_From'),
t = document.getElementById('J_To'),
b = document.getElementById('J_Add');
b.onclick = function() {
var val = f.value;
val = '+' + val;
t.value = val;
};
})();
</script>
</body>
</html>
希望是你要的结果,如有疑问,欢迎追问,望采纳~~