{"size": 851, "ext": "js", "max_stars_repo_path": "apps/public-web/src/EShopOnAbp.PublicWeb/Pages/payment.js", "max_stars_repo_name": "ngocminh2306/eShopOnAbp", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "apps/public-web/src/EShopOnAbp.PublicWeb/Pages/payment.js", "max_issues_repo_name": "ngocminh2306/eShopOnAbp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "apps/public-web/src/EShopOnAbp.PublicWeb/Pages/payment.js", "max_forks_repo_name": "ngocminh2306/eShopOnAbp", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 50.0588235294, "max_line_length": 134, "alphanum_fraction": 0.6815511163}
(function () {
    let form = document.querySelector("form");
    
    form.onsubmit = function (e) {
        let addressInput = document.createElement('input');
        addressInput.setAttribute('name', "model.SelectedAddressId");//set the param name
        addressInput.setAttribute('value', document.querySelector(".address-list .card.is-selected").getAttribute("data-address-id"));
        addressInput.setAttribute('type', "hidden");
        form.appendChild(addressInput);

        let paymentInput = document.createElement('input');
        paymentInput.setAttribute('name', "model.SelectedPaymentId");
        paymentInput.setAttribute('value', document.querySelector(".payment-list .card.is-selected").getAttribute("data-payment-id"));
        paymentInput.setAttribute('type', "hidden");
        form.appendChild(paymentInput);
    };
})();