Hongmu Notes
Home Language Notes JavaScript

JavaScript

Introduction: js generally refers to JavaScript. JavaScript ("JS" for short) is a lightweight, interpreted or just-in-time compiled programming language with function priority. Although it is famous as a scripting language for developing Web pages, it is also used in many non-browser environments. JavaScript is a dynamic scripting language based on prototype programming and multi-paradigm.

Found a really nice 404 page!

Found a really nice 404 page! Language Notes CSS JavaScript

Display effect. Code: <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width...>
👁 144
A novel reader written in html, php, ajax

A novel reader written in html, php, ajax Language Notes PHP CSS JavaScript Bootstrap

Pure reading version: <?php // index.php session_start(); $uploadDir = 'books/'; $booksFile = $uploadDir . 'books.json'; // Initialize the book storage directory if (!file_exists($uploadDir))…
👁 171
How to pass variables to js files in php? (How does the code in the js file obtain external variables?)

How to pass variables to js files in php? (How does the code in the js file obtain external variables?) Language Notes PHP JavaScript

If you want to pass variables from PHP into a JavaScript file, you have a few options: Inline JavaScript: You can use PHP variables directly in JavaScript code in an HTML file, just like you did in the example code. This allows PHP to include the values of PHP variables when generating JavaScript code. But this…
👁 210
HTML+CSS+Swiper realizes the idea of sliding left and right in three columns on NetEase Cloud mobile phone

HTML+CSS+Swiper realizes the idea of sliding left and right in three columns on NetEase Cloud mobile phone Language Notes CSS JavaScript

First use Swiper to slide left and right! Then use HTML+css to realize text and picture layout display! Code: 🔒 Hidden content: Members can view <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <tit…
👁 188
jQuery modifies the height-to-width ratio of the banner display in real time

jQuery modifies the height-to-width ratio of the banner display in real time Language Notes JavaScript

Recently, I encountered some problems when modifying the PC side to a responsive template. For the slides on the PC, they do not use the img tag to display them directly. Instead, they use a li tag and then set a background image for the li tag. And set a fixed height for the background image. So I found that if I want to control the height of this slide by writing css, it is better to control it directly with js. function setFlashHeight()…
👁 172
PHP + HTML + jQuery + Bootstrap – Functional page for querying and modifying a database

PHP + HTML + jQuery + Bootstrap – Functional page for querying and modifying a database Language Notes PHP mySql JavaScript Bootstrap

The screenshot is as follows: `index.html` `<!DOCTYPE html>` `<html lang="en">` `<head>` `<meta charset="UTF-8"` `<meta name="viewport" content="width=device...`
👁 259
After jQuery clicks on the pre tag, it saves the content in the pre tag as a file and downloads it.

After jQuery clicks on the pre tag, it saves the content in the pre tag as a file and downloads it. Language Notes JavaScript

This code is a JavaScript/jQuery function. Its main function is to download its text content to the local computer in the specified file type when the user clicks on the &lt;pre&gt; element after the page is loaded. The specific code analysis is as follows: First use the $(document).ready() method to ensure that the code is executed after the document is loaded. Use the $() function to select…
👁 174
jQuery code to output the current date and lunar calendar in the specified id box

jQuery code to output the current date and lunar calendar in the specified id box Language Notes JavaScript

The interface called is: China Observatory Lunar Calendar Data Interface More functions Self-research jQuery code: $(document).ready(function() { var resultElement = $("#result"); function getDayInfo(date) { var apiUrl = "https://…
👁 177
js click the button to pop up the query...the query results will be displayed after three seconds

js click the button to pop up the query...the query results will be displayed after three seconds Language Notes JavaScript

After clicking the button, a box pops up, showing that the payment status is being checked.... After three seconds, it prompts that the payment bill has not been found, please pay. The main logic is like this. As for the code that can be added to the backend request in the middle, it is omitted here. The html code is: <button data-v-b863db80="" type="button" class="el-button b…
👁 168
jQuery clicks the show button to display the password in the password box

jQuery clicks the show button to display the password in the password box Language Notes JavaScript

jQuery Click the show button to display the password in the password box. The jQuery code is: $(document).ready(function() { $('#pwd_show').click(function() { var passwordInput = $('#password'); if (passwordInput…
👁 212
1 2 3 4