HaB*_*aBo 1 javascript jquery time-wait
如何设置此功能的等待时间.
function UpdateMedicaitonHistory(data) {
MedicaitonHistoryGrid();
//set a wait time to finish MedicaitonHistoryGrid() like for 3 seconds
// then execute the below code.
if ($("#MedHistoryGridSec").is(":visible")) {
alert("yes we have grid");
}
else{
alert("No Grid");
}
}
Run Code Online (Sandbox Code Playgroud)
你可以使用setTimeout:
setTimeout(function()
{
if($('#MedHistoryGridSec').is(':visible'))
alert('yes');
else
alert('no');
}, 3000);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
18960 次 |
| 最近记录: |