»
Tiếng AnhTiếng PhápTiếng Việt

In - Sao chép field - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Biểu mẫu » Sao chép field
URL: https://www.javascriptbank.com/copy-fields-2.html

Sao chép field © JavaScriptBank.comHiệu ứng có thể được dùng để sao chép dữ liệu giữa các trường với nhau.

Phiên bản đầy đủ: jsB@nk » Biểu mẫu » Sao chép field
URL: https://www.javascriptbank.com/copy-fields-2.html



JavaScript
<script language="javascript">// Created by: Will Bontrager :: http://www.willmaster.com/function FillBilling(f) {  if(f.billingtoo.checked == true) {    f.billingname.value = f.shippingname.value;    f.billingcity.value = f.shippingcity.value;    /* If more fields are used, just expand the parameters       above to include the additional fields. */  }}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form>Name:<input type="text" name="shippingname"><br>City:<input type="text" name="shippingcity"><br><input type="checkbox" name="billingtoo" onclick="FillBilling(this.form)"><br><br><em>Copy to billing fields.</em><br><br>Billing Name:<input type="text" name="billingname"><br>Billing City:<input type="text" name="billingcity"><br><input type="submit"></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->