Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试根据图像的标题重新加载 jqgrid。如果标题是 liveON,它应该进入内部,但不是。问题是什么?我需要用 jquery 获取标题参数吗?提前致谢。
function reloadJson(){ alert("Go!"); if (document.getElementById("auto_reload").title == "liveON") { $('#list').trigger("reloadGrid"); } }
使用 jQuery:
if ($("#auto_reload").attr("title") == "liveON") { $('#list').trigger("reloadGrid"); }