如何通过按钮将多个值传递给弹出窗口?
<button class="btn btn-success edit-company" data-id="{{ $cp->companyId }}" data-name="{{ $cp->companyName }}" data-nature="{{ $cp->businessNature }}" data-address="{{ $cp->companyAddress }}" data-zip="{{ $cp->companyZipcode }}" data-area="{{ $cp->companyAddressArea }}" data-email="{{ $cp->companyEmail }}" data-phone="{{ $cp->companyPhoneNumber }}" data-website="{{ $cp->companyWebsite }}">
<i class="fa fa-edit m-right-xs"></i>
Edit Profile
</button>
答案 0 :(得分:0)
$('.edit-company').on('click',function(){
var Name = $(this).data('name');
// Here 'Name' will be having the value you passed to the popup
});