在javascript的不同字段中复制我的地址
我的jsp中有不同的地址,我可以选择复制到我的字段。我想知道是否有人用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
不同的可编辑字段。地址列表,当我选择地址时,我想自动通知我的字段我想是时候学习基本的JavaScript/HTML DOM:)以下是一些教程:
<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:)以下是一些教程:
<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;
你能详细说明一下吗?我真的不明白你想要什么不同的可编辑字段。一个地址列表,当我选择一个地址时,我会自动通知我的字段。请详细说明?我真的不明白你想要什么不同的可编辑字段。地址列表,当我选择一个地址时,我会自动通知我的字段