stockQuote.js
上传用户:shen332233
上传日期:2021-09-03
资源大小:7478k
文件大小:1k
- var stockTickerUpdateIntervalID = 0;
- function handleStockTickersChange() {
- clearStockTickerUpdateInterval();
- }
- function clearStockTickerUpdateInterval() {
- if(stockTickerUpdateIntervalID != 0) {
- window.clearInterval(stockTickerUpdateIntervalID);
- }
- document.getElementById("trackFlag").checked = false;
- }
- function updateStockQuote() {
- var ajaxRequest = new AjaxRequest("UpdateStockQuote");
- ajaxRequest.addFormElementsById("stockTickers");
- ajaxRequest.sendRequest();
- }
- function startUpdateStockQuoteInterval() {
- stockTickerUpdateIntervalID = window.setInterval("updateStockQuote()", 90000);
- }
- function handleTrackFlagClick() {
- var trackFlag = document.getElementById("trackFlag");
- if(trackFlag.checked) {
- updateStockQuote();
- startUpdateStockQuoteInterval();
- }
- else {
- clearStockTickerUpdateInterval();
- }
- }