Compare Page Revisions
« Older Revision - Back to Page History - Newer Revision »
Table of Contents [Hide/Show]
Navigating Displaying the current URL Displaying the Document Timestamp Setting Initial Focus Submitting a Form Applying Alternating Formats to a Table AjaxReloadElement Function Showing the Print Dialog Highlight Flash Timer =Delayed Function Call =Recurring Function Call
window.location.href = '...';
document.write(document.URL);
document.write(document.lastModified);
document.getElementById("myControlId").focus();
document.forms[0].submit();
even
odd
function recolorTable() { var rows = '#MyTable tbody tr' $(rows).removeClass('even').removeClass('odd'); $(rows + ':visible:even').addClass('even'); $(rows + ':visible:odd').addClass('odd'); }
function ajaxReloadElement(url, data, targetSelector, httpMethod) { if (httpMethod == undefined || httpMethod == null) { httpMethod = 'GET'; } $.ajax({ type: httpMethod, url: url, async: false, datatype: 'json', data: data, success: function (response) { $(targetSelector).html(response); } /* success */ }); /* ajax */ }
window.print();
selector
function highlightFlash(selector) { $(selector).show(); $(selector).css('background-color', '#FFFF00'); setTimeout(function () { $(selector).css('background-color', '#FFFFFF'); }, 1000); }
setTimeout("myFunction", ms);
setTimeout(function(){/* do something */}, ms);
var x = setInterval("myFunction", ms); . . . clearInterval(x);
var x = setInterval(function(){/* do something */}, ms); . . . clearInterval(x);
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.