我得到错误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