Hongmu Notes
Home Language Notes

Language Notes

css absolute positioning center

css absolute positioning center Language Notes CSS

There are numerous methods to achieve absolute positioning with centering in CSS; below, we will introduce four such techniques. 1. A widely compatible and mainstream approach for achieving absolute positioning with centering in CSS: `.container {width: 600px; height: 400px; position: absolute; left: 50%; top: 50%; margin:...`
👁 414
php import sql file into database

php import sql file into database Language Notes PHP PHP collection PHP and mysql

Using PHP to import an SQL file into a database is commonly employed during source code installation; this code encapsulates a class sourced from the internet: <?php /** * Created by PhpStorm. * User: Administrator * Date: 2018/10/13 * Time: 10:25 */ class ImportData{/...
👁 217
js jump to the specified page after 5 seconds

js jump to the specified page after 5 seconds Language Notes JavaScript

Analysis: 1. If navigation is required, use the `href` attribute of the `location` object. 2. To create a 5-second countdown, use `setInterval`. HTML: `<div id= "msg"></div>` JavaScript: `window.onload=function(){...}`
👁 141
js mouse scroll automatically hides navigation menu

js mouse scroll automatically hides navigation menu Language Notes JavaScript

HTML code: <header class= "header-navigation" id= "header" > <nav> <a class= "link" href= "#" title=&qu...
👁 128
sqlite uses PDO to execute SQL statements exec(), query()

sqlite uses PDO to execute SQL statements exec(), query() Language Notes mySql

In PHP scripts, executing SQL queries using PDO to interact with a database can be done through three different approaches; the choice of which method to use depends on the specific operation you intend to perform. 1. Using the PDO::exec() method: When executing queries such as INSERT, UPDATE, or DELETE that do not return a result set, use the exec() method on a PDO object to execute the query. Upon successful execution, this method returns the number of affected rows...
👁 323
jQuery uses Ajax to submit messages and forms without refreshing

jQuery uses Ajax to submit messages and forms without refreshing Language Notes JavaScript

PbootCMS itself will return Json data when submitting using ajax request, so we can implement ajax submission without using API, and customize page prompts to improve user experience. &nbsp; 1. Message form &lt;form&nbsp;onsubmit=&quot;return&nbsp;submsg(this);&q…
👁 132
Small problems with jquery each and splicing

Small problems with jquery each and splicing Language Notes JavaScript

Selector + traversal $(&#39;div&#39;).each(function (i){ &nbsp; i is the index value &nbsp; this means traversing each dom object }); $(&#39;div&#39;).each(function (index,domEle){ &nbsp; index is the index...
👁 147
jquery common codes

jquery common codes Language Notes JavaScript

Hover event: &lt;script&gt; &nbsp;&nbsp; &nbsp;$(function () { &nbsp;&nbsp; &nbsp;$(&quot;.pro_box a&quot;).hover(function(){ &nbsp;&nbsp; &nbsp;&nbsp;&nb…
👁 154
PHP generates random numbers with specified number of digits

PHP generates random numbers with specified number of digits Language Notes PHP

How can I generate a random number with 70 to 80 digits? To solve this problem, I wrote a function: "`php function rand_num($num = 1){ &nbsp;&nbsp;&nbsp; $num = (int) $num; $rand ="; //... "`
👁 186
Create a folder in php and set the access permission to 7777

Create a folder in php and set the access permission to 7777 Language Notes PHP

define('CACHE_ROOT', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'cacheFile'); if(!file_exists(CACHE_ROOT)){ mkdir(CACHE_ROOT,0777); chmod(CACHE_ROOT,07…
👁 145
1 21 22 23 24 25 33