第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

同步的 XMLHttpRequest 已不推薦使用 , 那怎么實現(xiàn)同步操作呢 ?

同步的 XMLHttpRequest 已不推薦使用 , 那怎么實現(xiàn)同步操作呢 ?

hhhzihao2 2016-05-16 17:03:45
$(function?()?{ ??$("img[id^='isshow']").click(function()?{ ????var?$id?=?$(this).attr('id').replace('isshow',?''); ????if?($(this).attr('src').match('yes'))?{ ??????var?$isshow?=?'yes'; ??????var?$newisshow?=?'no'; ????}?else?{ ??????var?$isshow?=?'no'; ??????var?$newisshow?=?'yes'; ????} ????var?$data?=?0; ????$.ajax({ ??????type:?'post', ??????url:?'__URL__/isshowPro', ??????//?async?:?false, ??????data:?{'id':$id,?'isshow':$newisshow}, ??????success:?function?(data)?{ ????????$data?=?data; ??????} ????}); ????if?($data?==?1)?{ ??????$(this).attr('src',?function?()?{ ??????????return?$(this).attr('src').replace($isshow,?$newisshow); ??????}); ????} ??})?? }) 如果?//?async?:?false?,?打開?,?火狐會出現(xiàn)這個警告?: "主線程中同步的?XMLHttpRequest?已不推薦使用,因其對終端用戶的用戶體驗存在負(fù)面影響。更多幫助請見?http://xhr.spec.whatwg.org/" 問?:?如果?async?:?true?,?如何同步地實現(xiàn)這段代碼?? if?($data?==?1)?{ ??????$(this).attr('src',?function?()?{ ??????????return?$(this).attr('src').replace($isshow,?$newisshow); ??????});
查看完整描述

目前暫無任何回答

  • 0 回答
  • 0 關(guān)注
  • 16607 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號