Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在javascript的不同字段中复制我的地址_Javascript_Jsp_Field - Fatal编程技术网

在javascript的不同字段中复制我的地址

在javascript的不同字段中复制我的地址,javascript,jsp,field,Javascript,Jsp,Field,我的jsp中有不同的地址,我可以选择复制到我的字段。我想知道是否有人用javascript提供了示例代码,谢谢 不同的可编辑字段。地址列表,当我选择地址时,我想自动通知我的字段我想是时候学习基本的JavaScript/HTML DOM:)以下是一些教程: 首先,您需要为感兴趣的HTML元素提供一个ID: <input type="text" id="address"> <input type="text" id="otherAddress"> 您可以通过va

我的jsp中有不同的地址,我可以选择复制到我的字段。我想知道是否有人用javascript提供了示例代码,谢谢


不同的可编辑字段。地址列表,当我选择地址时,我想自动通知我的字段

我想是时候学习基本的JavaScript/HTML DOM:)以下是一些教程:

首先,您需要为感兴趣的HTML元素提供一个ID:

<input type="text" id="address">
<input type="text" id="otherAddress">
您可以通过
value
属性获取值:

var addressValue = addressElement.value;
otherAddressElement.value = addressValue;
可以使用相同的属性设置值:

var addressValue = addressElement.value;
otherAddressElement.value = addressValue;

我认为是时候学习基本的JavaScript/HTML DOM:)以下是一些教程:

首先,您需要为感兴趣的HTML元素提供一个ID:

<input type="text" id="address">
<input type="text" id="otherAddress">
您可以通过
value
属性获取值:

var addressValue = addressElement.value;
otherAddressElement.value = addressValue;
可以使用相同的属性设置值:

var addressValue = addressElement.value;
otherAddressElement.value = addressValue;

你能详细说明一下吗?我真的不明白你想要什么不同的可编辑字段。一个地址列表,当我选择一个地址时,我会自动通知我的字段。请详细说明?我真的不明白你想要什么不同的可编辑字段。地址列表,当我选择一个地址时,我会自动通知我的字段