current location:Home > Technical Articles > Web Front-end
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- jQuery's JSONP Explained with Examples
- Summary of key points JSONP (JSON with padding) allows cross-domain Ajax calls, circumventing homologous policies that restrict scripts from accessing data from different sources. This is done by having the server return JSON data containing the function call, which the browser can interpret. While JSONP is valuable for getting data from different sources and accessing content for various services, it also has some limitations. JSONP can only perform cross-domain GET requests and must be explicitly supported by the server. It also has potential security issues as it opens up possibilities for cross-site scripting (XSS) attacks. Other solutions for homologous policies include the use of proxy or the implementation of cross-origin resource sharing (CORS)
- JS Tutorial 191 2025-02-17 10:34:10
-
- How to Pass Command Line Parameters to Gulp Tasks
- Core points The simplicity of Gulp.js is one of its most attractive features, allowing developers to write task functions in gulpfile.js and execute them from the command line. However, it does not support passing command line parameters to tasks for use. Although Gulp tasks usually do not require parameters, parameters can be useful in some cases. For example, passing FTP credentials as parameters can enhance security and prevent hard-coded sensitive information. The process.argv property in Node.js returns an array containing processes, scripts, and all command line parameters. This array can be parsed in gulpfile.js to create an object containing parameter values. Although Gul
- JS Tutorial 680 2025-02-17 10:32:10
-
- JavaScript Functional Testing with Nightwatch.js
- Eric Elliott once wrote an article about JavaScript testing: JavaScript Testing: Unit Testing, Functional Testing, and Integration Testing, which explains different types of tests and when to use which test. This article will explore JavaScript functional testing in more depth and demonstrate using the Nightwatch.js library. Before we get started, let's review what functional testing is and why it is important. Simply put, functional testing is designed to ensure that the application works as expected from a user's perspective. What we are talking about here is not technical testing such as unit testing or integration testing. The goal here is to ensure that users can perform seamlessly
- JS Tutorial 430 2025-02-17 10:26:10
-
- Getting Started with PouchDB Client-Side JavaScript Database
- This article has been reviewed by Sebastian Seitz and Taulant Spahiu. Thanks to SitePoint's peer reviewers for their contributions! Modern client-side web applications demand sophisticated data handling capabilities. Browsers now offer robust JavaS
- JS Tutorial 976 2025-02-17 10:24:15
-
- 5 jQuery Print Page Options
- The jQuery Print Plugin allows you to control and customize which parts of a website are printed, providing an alternative to browser default printing capabilities (usually printing the entire window). This article will explore several popular jQuery printing plugins and demonstrate how to build this feature yourself. Key points: The jQuery Print Plugin allows you to control and customize which parts of the website are printed, providing an alternative to the browser's default printing function (usually printing the entire window). The jQuery Print Preview plugin opens a new browser window to display specific parts of the website for printing. This plugin is very useful for printing data parts such as information cards or a row in a table. j
- JS Tutorial 201 2025-02-17 10:23:14
-
- Creating Media Queries for Responsive Web Designs
- This article explores responsive web design using media queries, a crucial tool for adapting websites to various devices. It focuses on how media queries allow developers to detect device properties and apply different CSS styles based on those prop
- CSS Tutorial 370 2025-02-17 10:21:10
-
- 15 Ways to Write Self-documenting JavaScript
- Key points for writing self-documented JavaScript code This article will explore how to write self-documented and maintained self-documented JavaScript code through structured techniques, naming conventions, and syntax techniques. While self-documented code can reduce the need for comments, it does not completely replace good comments and comprehensive documentation. Core skills Structured technology: Move code into functions, replace conditional expressions with functions, and use pure functions to make the code clearer and easier to understand. Naming convention: Use meaningful names to name variables, functions, and classes to improve code readability. Syntax tips: Avoid using syntax tips, use named constants and make the code clearer. Extract code with caution: Avoid
- JS Tutorial 788 2025-02-17 10:16:09
-
- jQuery Pagination Plugins
- This article reviews several jQuery pagination plugins, updated in February 2017 for accuracy. Displaying extensive results lists inefficiently is a common problem; pagination offers a superior solution. While server-side pagination fetches paged co
- JS Tutorial 764 2025-02-17 10:14:10
-
- Animating the DOM with Anime.js
- Anime.js: A Lightweight JavaScript Animation Library for Dynamic DOM Effects Looking for a fast and lightweight animation library for your web projects? Anime.js, created by Julian Garnier, is a strong contender, especially for dynamic DOM animati
- JS Tutorial 922 2025-02-17 10:13:10
-
- Pseudo-classes - The Basics
- (Adapted from "HTML5 & CSS3 for the Real World" by Alexis Goldstein, Louis Lazaris and Estelle Weyl) Core points CSS pseudo-classes are used to define the special state of elements, including structure, user operations, input and negation pseudo-classes and other types. They can style elements based on the location of the element in the document tree, user interaction, form element state, or elements that do not match a particular selector. Some pseudo-classes may have security issues, such as: visited pseudo-classes, which can be used by an attacker to check the user's browsing history. Modern browsers are restricted to:visite
- CSS Tutorial 441 2025-02-17 10:12:10
-
- Getting Started With Vue.js
- Quick look at the core concept of Vue.js Vue.js is a JavaScript library based on the MVVM architecture, used to build user interfaces. It is simpler, easier to learn and flexible than AngularJS. Its core functions include: Data binding: Supports one-way and two-way data binding, v-model instructions implement bidirectional binding, and model changes are reflected in the view in real time. Instructions and Filters: Instructions are used to operate the DOM, and filters are used to process data. Componentization: Create reusable custom HTML elements, improve code readability and maintenance, and use props attributes to pass component attributes. Note: This tutorial is based on Vue.js 1.x version. Please refer to other resources for Vue 2.x tutorial
- JS Tutorial 620 2025-02-17 10:10:10
-
- 10 Need-to-Know RxJS Functions with Examples
- This article was reviewed by Florian Rappl and Moritz Kröger. Thanks to all the peer reviewers at SitePoint for making SitePoint’s content perfect! With the growing interest in functional reactive programming (FRP), RxJS has become one of the most popular JavaScript libraries in this paradigm. In this article, we will explore the top ten must-know functions in RxJS. Note: This article assumes that you are familiar with the basics of RxJS, as described in the article "Beginning with Functional Reactive Programming with RxJS". Key Points RxJS utilizes observable objects similar to arrays filled over time
- JS Tutorial 232 2025-02-17 10:08:10
-
- Quick Tip: How to Throttle Scroll Events
- Key Points Listening to scroll events can cause performance degradation because the browser executes a callback function every time the user scrolls; throttling and debounce are two common functions to manage this problem. Throttle ensures a constant flow of events over a given time interval, while de-bumping combines a series of events into a single event. Implementing event throttling in JavaScript can be complicated, and it is recommended to use a third-party implementation like lodash, which is the standard for event throttling. Lodash's throttling function simplifies rolling event throttling and provides options to determine whether the callback function is executed at the front and/or back edge of the event. The key to choosing throttling and debounce is to see the nature of the problem to be solved. Throttle is suitable for events that occur within a given time span
- JS Tutorial 936 2025-02-17 10:07:11
-
- Fun Functional Programming with the Choo Framework
- Choo: A Minimalist JavaScript Framework for Single-Page Applications Choo is a lightweight JavaScript framework perfect for crafting single-page applications (SPAs) using functional programming principles. It cleverly integrates the best aspects of
- JS Tutorial 1026 2025-02-17 10:06:10
-
- How to Easily Share Code Between Projects with Bit
- Bit: Simplify code sharing and improve team efficiency Bit is a powerful tool that simplifies the process of code sharing among projects without splitting the code base or refactoring the project. You can share code snippets directly from any code base and install them into other projects using npm. Bit provides a scalable code sharing solution. You can specify the code component to share, Bit defines its dependency tree, and then share it to a shared location called "Scope". These components can be installed using npm and Yarn, just like any other package. Bit also simplifies the modification of shared code. You can import the source code into any path in the code base, make changes, and Bit will track
- JS Tutorial 678 2025-02-17 10:05:10