
記載された情報が古くなっている可能性がございますので十分ご注意ください。
こんな感じよいのかな。
チェックする関数部分
< script type = "text/javascript" > <!-- var s = false; function isScrollEnd() { var e = document.getElementById("attention"); return !(parseInt(e.scrollHeight) - parseInt(e.clientHeight) - parseInt(e.scrollTop)); } // --> </ script > |
スクロール表示部分
< div class = "innerframe" id = "attention" onscroll = "s = s | isScrollEnd();" > |
スクロール判定部分
< input type = 'button' value = "ちゃんと読んだ?" name = "agree" onclick = "if(s) alert('読んでくれてありがとう'); else alert('読んでないじゃん');" > |