jq('#texsscdmalsc').click(function(){ var spurl = jq("#html_img").val(); if (spurl.indexOf("1688.com")>=0){ re = /\/\/[^\s]*1688.com/; spurl =spurl.match(re); var a='https://apps.1688.com/fragment/offerdetail.htm?site_id=winport&page_type=offerdetail&apps=%5B%7B%22appName%22%3A%22sellerinfo%22%7D%5D&is_diy=false&_server_name='+spurl; var splog = a.replace(/\=\/\//g,'='); jq.ajax({ type: "get", async: false, url: splog, dataType: "jsonp", success: function(json){ var hsmks = json.result[0].html; hsmks = hsmks.match(/memberId":"(.*?)"/)[1]; jq("#scdm_html").val('http://m.1688.com/page/offerlist.html?keywords='+encodeURIComponent(jq("#fenleimc").val())+'&style=&memberId='+hsmks); plstzclipall(); }, error: function(){ alert('获取失败,请填写阿里巴巴店铺地址获取手机端搜索页地址'); } }); }else{ alert("请填写阿里巴巴店铺地址获取手机端搜索页地址"); } })