Home > front end >  Regular contains Chinese characters and the browser plug-in cross-domain problem
Regular contains Chinese characters and the browser plug-in cross-domain problem

Time:12-23

Consult a novice low-level problem, a web page to determine if there are any "see all logistics" the six characters, how do you write with regular?
This is to write code in a browser plug-in, behind the taobao execute this code, you will be prompted cross-domain problem, for ace to pay

 
$. Ajax ({' url ':' https://trade.taobao.com/trade/detail/trade_order_detail.htm? Biz_order_id='+ id, async' : true, 'type' : 'get', success: function (res) {
If (res) match (/'see all logistics/)) {
//if (res) indexOf (' see all logistics') & lt; 0 {
Action (oid, 1, 'open single delivery).
return false;
}}})


  • Related