我得到錯誤PriceSelling
未定義。但事實上,我知道它在頁面上,因爲它將它記錄在控制檯中。請幫忙!謝謝PriceSelling未定義。但是,它是
$.get(window.location, function(data){
var regex=/<span class="it " data-se="item-privatesale-price">([\d,]+)<\/span>/;
var PriceSelling = data.match(regex)[1];
console.log(PriceSelling);
});
function get(name){
if(name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search))
return decodeURIComponent(name[1]);
}
if (get('bot') && get('expecting') && get('expecting') == PriceSelling) {
console.log("It's a go!");
document.getElementsByClassName('conf-buy-now btn-primary btn-medium PurchaseButton ')[0].click();
//document.getElementById('conf-confirm-btn').click();
};
PriceSelling未在您調用的範圍內定義。 – smk