ORCA通信とはサイズから定期的に発行されるスペック作成のヒントと新規開発されるメニューのご案内です。
var WAIT_MIN = 1; | ||
var waitTime = WAIT_MIN * 30; | ← | 次へボタンを表示させるまでの時間(秒数) |
基本的な変更箇所は↑この1点のみです。 var timeEnd = null; var nextButtonId = "xnext"; var nextButtonElem; var nextButtonStyleDisplay = ""; function hide_button() { if( nextButtonElem ) { nextButtonStyleDisplay = nextButtonElem.style.display; nextButtonElem.style.display = "none"; nextButtonElem.disabled = true; } } function show_button() { if( nextButtonElem ) { nextButtonElem.disabled = false; nextButtonElem.style.display = nextButtonStyleDisplay; } } function countDown() { if( ! timeEnd ) { timeEnd = new Date(); timeEnd.setTime( timeEnd.getTime() + 1000 * waitTime ); } var timeNow = new Date(); var timeNowSec = Math.floor( timeNow.getTime() / 1000 ) var timeRemainSec = Math.floor( timeEnd.getTime() / 1000 ) - timeNowSec; if( timeRemainSec <= 0 ) { waitTime = 0; } } function timerControl() { var timeout = 250; if( waitTime == 0 ) { setTimeout( "show_button()", timeout ); } else { countDown(); setTimeout( "timerControl()", timeout ); } } function get_next_button() { nextButtonElem = document.getElementById("xnext"); } function init_button_ctrl() { get_next_button(); hide_button(); timerControl(); } function init() { init_button_ctrl(); } ※ onload=の入力欄に init(); を入力します。 |
サンプルスペック | 説明 |
---|---|
19000.Q | 設問(説明文設問) |
BANK | 19100.Q・19200.Qを同じ画面へ表示します。 |
19100.Q/19200.Q | 設問(文字入力設問) |
vol.018へ | vol.020へ |