var timer; // Declare timer variable globallyvar isPaused = true; // Initialize the slideshow statefunction startSlideshow() { if (!isPaused) { timer = setTimeout(function() { window.location.href = encodeURI(encodeURI("${contextPath}/decision/view/form?viewlet=doc/JS/表单JS实例/01-JS实现暂停和继续轮播frm报表2.frm")); }, 2000); // Slideshow interval }}function stopSlideshow() { clearTimeout(timer);}function updateSlideshowState() { var ratioValue = $("").val(); // Get the value of the "RATIO" control if (ratioValue === "true") { isPaused = false; startSlideshow(); } else { isPaused = true; stopSlideshow(); }}$("").on("change", function() { updateSlideshowState(); // Update slideshow state when "RATIO" value changes});// Initial update of slideshow stateupdateSlideshowState();