【发布时间】:2016-02-12 02:20:01
【问题描述】:
``` .col-md-6 %h3 美国地址
%form.form-horizontal %label 街道地址 %input.form-control{id: 'street', name: 'street', 样式: 'margin-bottom: 10px;font-size:13px;height:30px"'}
%label 城市 %input.form-control{id: 'city', name: 'city', style: 'margin-bottom: 10px;font-size:13px;height:30px"'}
%label 状态 %input.form-control{id: 'state', name: 'state', style: 'margin-bottom: 10px;font-size:13px;height:30px"'}
%label 邮政编码 %input.form-control{id: 'zipcode', name: 'zipcode', style: 'margin-bottom: 10px;font-size:13px;height:30px"'}
.row %br %br %input.btn.btn-ss-alt.btn-lg{type: "submit", name: "commit", style: "margin-bottom:20px;float:right;margin-right: 15px;padding:10px 72px ;"}
.col-md-6 %h3 国际地址
%form.form-horizontal %label 街道地址 %input.form-control{id: 'street', name: 'street', 样式: 'margin-bottom: 10px;font-size:13px;height:30px"'}
%label 城市 %input.form-control{id: 'city', name: 'city', style: 'margin-bottom: 10px;font-size:13px;height:30px"'}
%label 状态 %input.form-control{id: 'state', name: 'state', style: 'margin-bottom: 10px;font-size:13px;height:30px"'}
%label 邮政编码 %input.form-control{id: 'zipcode', name: 'zipcode', style: 'margin-bottom: 10px;font-size:13px;height:30px"'}
.row %br %br %input.btn.btn-ss-alt.btn-lg{type: "submit", name: "commit", style: "margin-bottom:20px;float:right;margin-right: 15px;padding:10px 72px ;"} ```
SmartyStreets 插件仅适用于第一种形式,不适用于第二种形式。
var liveaddress = $.LiveAddress({
key: #{ENV['SMARTY_STREETS']},
debug: true,
addresses: [{
street: '#street',
city: '#city',
state: '#state',
zipcode: '#zipcode'
}]
});
【问题讨论】:
标签: javascript jquery smartystreets