JavaScript Retrieve Web URL and Parameters
Using JavaScript to retrieve URL information
<script type="text/javascript">
document.write("location.host=" + location.host + "<br>");
document.write("location.hostname=" + location.hostname + "<br>");
document.write("location.href=" + location.href + "<br> ...
Posted on Fri, 22 May 2026 23:34:02 +0000 by han2754
Getting Started with jQuery 3:Selectors, Events, and DOM Manipulation
Introduction
jQuery is a lightweight JavaScript library that simplifies HTML document traversal, event handling, animation, and Ajax interactions. Since its introduction, it has remained a popular choice for developers seeking to build interactive web pages efficiently.
This guide covers fundamental jQuery concepts including element selection u ...
Posted on Mon, 18 May 2026 04:09:27 +0000 by Vince
Dynamic Text Generation with Template Literals and Iteration
Using template literals with loop structures allows for efficient generation of formatted text content. The backtick syntax enables multi-line strings and variable interpolation through the ${} syntax.
const teacherList = [
"Chen*ming (Mathematics)",
"Li*wei (Physics)",
"Wang*fang (Chemistry)",
&quo ...
Posted on Fri, 15 May 2026 18:58:00 +0000 by GimbaL
Comprehensive Guide to CSS Styling, Modern Layouts, and JavaScript Fundamentals
CSS Visual Effects and Box Properties
Rounded Corners and Borders
The border-radius property defines the curvature of a element's corners. You can set individual corners or use shorthand values.
.card-container {
width: 320px;
height: 60px;
background-color: #00ced1;
/* Individual corners: Top-Left, Top-Right, Bottom-Right, Bottom-Left ...
Posted on Sat, 09 May 2026 17:47:47 +0000 by jlarson
Collected Reusable JavaScript Utility Functions
Real-time Current Time Formatter
// Initialize immediately to avoid blank initial render
updateTimeDisplay();
// Refresh every 1 second
setInterval(updateTimeDisplay, 1000);
/**
* Updates date and time display elements
*/
function updateTimeDisplay() {
const yearEl = document.querySelector('.date-display .year');
const monthEl = document ...
Posted on Fri, 08 May 2026 04:32:43 +0000 by landavia
jQuery DOM Manipulation and Element Operations
CSS Class Operations
addClass(); // Applies specified CSS class
removeClass(); // Removes specified CSS class
hasClass(); // Checks for class existence
toggleClass(); // Toggles class state
Example: Light switch and modal dialogs
CSS Property Manipulation
css("color","red") // DOM equivalent: element.style.color = "red ...
Posted on Thu, 07 May 2026 16:53:14 +0000 by andychamberlainuk