做
var old = /*value*/ function loop(){ if (/*value*/ != old){ //check if the value is not old //do stuff } old = /*value*/ //set old to value requestAnimationFrame(loop) //loop every frame } requestAnimationFrame(loop) //wait a frame
或
var old = /*value*/ function changed(){ var change = /*value*/ != old //check if the value is not old old = /*value*/ //set old to value return change //output change }
并将 /*value*/ 替换为要检查的值:)
以上是如何检查 javascript webbrowser 中的值是否已更改的详细内容。更多信息请关注PHP中文网其他相关文章!