-1
Я полный noob, когда дело доходит до программирования. Я написал этот скрипт для флажка в Acrobat и хотел бы узнать у сообщества, что лучше, более сжатым способом его написать. ТИА !!!Лучшее кодирование JavaScript - какова ваша рекомендация?
if (event.target.value == "Yes")
{
this.getField("b.address").value = this.getField("a.address").value
this.getField("b.address").readonly = true;
this.getField("b.city").value = this.getField("a.city").value
this.getField("b.city").readonly = true;
this.getField("b.st").value = this.getField("a.st").value
this.getField("b.st").readonly = true;
this.getField("b.zip").value = this.getField("a.zip").value
this.getField("b.zip").readonly = true;
} else
{
this.getField("b.address").readonly = false;
this.getField("b.address").value = "";
this.getField("b.city").readonly = false;
this.getField("b.city").value = "";
this.getField("b.st").readonly = false;
this.getField("b.st").value = "";
this.getField("b.zip").readonly = false;
this.getField("b.zip").value = "";
}