****************************** **How ​​to avoid using page cache? That is, every time the page is opened, the thing in the cache is not called ****************************** **How ​​to avoid using page cache? That is, every time the page is opened, the thing in the cache is not called
search
HomeWeb Front-endHTML TutorialUseful codes for web page production_HTML/Xhtml_Web page production

Useful codes for web page production_HTML/Xhtml_Web page production

May 16, 2016 pm 04:45 PM
&quoteventcodeit worksSearchwindowWeb page production

How to remove the scroll bar on the right side of the homepage?

********************************* How to disable page caching? That is, every time you open a page, you don’t call something in the cache. How to remove the scroll bar on the right side of the homepage?


********************** ***************
How to avoid using page cache? That is, every time the page is opened, the things in the cache are not called

****************** *******************
How to ignore the right click?

****** ******************************
How to control the CSS properties of different links on the same page?
a:active{}
a:link{}
a:visited{}
a.1:active{}
a.1:link{}
a.1:visited{}
in DW Define a new tag in CSS. According to HTML syntax, the hyperlink is
A.YOURS: LINK A.YOURS: HOVER
YOURS can be changed to your own word
and then select a link Finally, click YOURS in the middle of the CSS panel.
As needed, you can define N marks and N mouse OVER effects
****************************** ****
E-mail processing submission form



********************************** *
Is it possible to use layers to cover FLASH?
1. Add
2.
**** ******************************
How to call the corresponding page according to the screen resolution?
onclick=alert("Your display resolution is:" screen.width "×" screen.height)
First make several pages, for example, one htm1.htm is 800*600 and one is htm2.htm It is 1024*768
and then judge it in your entry page index.htm:







************************ **********
How to pop up a window with only status bar?


open() close()



Click the following button to display a new window...













                                                                                          #p#
**********************************
How to make hyperlinks without underlines
Enter the following code between … in the source code:

************************************
Please tell me how to make a web page close automatically.







This window will automatically close after 10 seconds without a prompt.
** ******************************
How to go to another page after a few seconds?
The code snippet is as follows:

Jump to jb51 after ten seconds .net homepage
******************************
How to make RealPlayer files on the web page An audition connection?

******* *************************
How to remove the up and down scroll bars of IE?


****************** ****************
Explain what is the difference between event.X and event.clientX?
event.clientX returns the X coordinate of the mouse relative to the client window when the event occurs
The same goes for event.X
But if the positioning attribute value of the event object is set to relative
event.clientX remains unchanged
And event. , mouse position, etc., the event object is only valid during the event.
event attribute:
altKey
Retrieve the current state of the ALT key
Possible values ​​true are closed
false is not closed
button
Retrieve the pressed mouse key
Possible values: 0 No key pressed
1 Press the left key
2 Press the right key
3 Press the left and right keys
4 Press the middle key
5 Press the left and middle keys
6 Press Right and middle keys
7 Press all keys
cancelBubble
Set or retrieve whether the current event bubbles the event handle
Possible values: false Enable bubbles
true Cancel bubbles for this event
clientX
Retrieves the X coordinate of the mouse cursor relative to the client area of ​​the window. The property is read-only and has no default value.
clientY
Retrieves the Y coordinate of the mouse cursor relative to the client area of ​​the window. The attribute is read-only and has no default value.
ctrlKey
ctrlKey retrieves the current state of the CTRL key
Possible values ​​true are closed
false is not closed
dataFld
Retrieve columns affected by oncellchange events
aTransfer
Provides predefined clipboard styles for drag and drop operations.
Element
Retrieves the object pointer that exited during the onmouseover and onmouseout events
keyCode
Sets or retrieves the Unicode keyword code associated with the keyword that raised the event
This attribute is the same as onkeydown onkeyup onkeypress Used together
The value is 0 if there is no keyword that triggered the event
offsetX
Retrieves the horizontal coordinate of the mouse position relative to the object that triggered the event
offsetY
Retrieves the horizontal coordinate of the mouse position relative to the object that triggered the event The vertical coordinate of the mouse position relative to the object
propertyName
Retrieve the name of the property that has been changed on the object
reason
Retrieve the result of the data transfer of the data source object
Possible values:
0 Data transfer successful
1 Data transfer failed
2 Data transfer error
recordset
Retrieve a reference to the default recordset in the data source object
This feature is read-only
repeat
Retrieve whether an event is repeated
This property only returns true if the onkeydown event is repeated
returnValue
Sets or retrieves the value returned from the event
Possible values:
true in the event The value is returned
false The default action of the event on the source object is canceled
screenX
Retrieves the horizontal position of the mouse relative to the user's screen
screenY
Retrieves the vertical position of the mouse relative to the user's screen
shiftKey
Retrieve the current state of the shiftKey key
Possible values ​​true is closed
false is not closed
srcElement
Retrieve the object that triggered the event
srcFilter
Retrieve the result The filter object triggered by the onfilterchange event
srcUm
Retrieves the same resource name that triggered the event behavior
This attribute is set to null unless both conditions below are true
1.The behavior is attached to On the elements that trigger the event
2. The behavior defined in the previous bullet has specified a URN identifier and the event that has been triggered
toElement
Retrieve the object moved as a result of the onmouseover or onmouseout event
type
Retrieve the event name in the event object
x
Retrieve the integer relative to the mouse horizontal coordinate of the parent feature
y
Retrieve the integer relative to the vertical mouse coordinate of the parent feature
* *******************************************
How to keep a window always on top?
Click here

                                                                        #p#
************************************************
target="_blank" specifies that the link should be opened in a new window, so what are the functions of target="_parent", target="_self", and target="_top"?
target="_parent", upper layer frame
target="_self", own window, frame
target="_top" top-level frame.
A more detailed explanation, found from the Internet:
_blank
Opens a new window, and it is an unnamed window.
_self
Forces the results of the link to be displayed in the same sub-screen, regardless of the BASE setting.
_parent
Displays the result of the link in the "parent screen" of the sub-screen (that is, the FRAMESET of the upper layer).
_top
Start displaying the screen from the top of the window; in other words, clear the entire window first and then load the link.
************************************************
How to make netizens bookmark this website so that the favorites display is not the immutable logo of Microsoft, but the ICON chosen by them?

Add it to the HADE tag, and put the image in the root directory, which must be in .ico format.
Some spaces are not supported Place it directly in the root directory
and must add

************ *********************************
How to monitor when a window is closed?

****************************** *******************
What are innerHTML, outerHTML...and innerText?

textlinkanother text
> ;






**** ******************************************
Window method list!
I found that people often ask questions about window operations,
so I took some time to compile this article.
I hope no one will ask this question again in the future.
Method list of window in ie
alert(sMsg)
//Pop up a confirmation message box
attachEvent(sEvent,pFunction)
//Bind a function to an event, event Randomly execute one of the bound functions when triggered
blur()
//Making the window lose focus
clearInterval(iIntervalID)
//Clear the associated function of the specified timer
clearTimeout( iTimeoutID)
//Clear the associated function of the specified delayer
close()
//Close the window. If the window is not opened with a script, a confirmation dialog box will pop up.
confirm([sMessage])
//Pop up the "Confirm/Cancel" dialog box
createPopup([vArgs])
//Create a hidden pop-up window, vArgs is considered to be provided in the future Parameters, return window handle
detachEvent(sEvent, pFunction)
//Cancel a bound function of an event
execScript(sExpression, sLanguage)
//Execute code in the specified language
focus()
//Activate the window
moveBy(iX,iY)
//Move the window in relative mode
moveTo(iLeft,iTop)
//Move the window in absolute mode
navigate(sURL)
//Go to the specified connection
open([sURL] [, sName] [, sFeatures] [, bReplace])
//Open a new window and return the window handle
//sName=(*_blank: Open a new unnamed window; _parent: Open in the parent window; _search: Open the search window at the same time; _self: Replace this window; _top: Open in the top-level window; *)
//sFeatures=(*channelmode = { yes | no | 1 | 0 };directories = { yes | no | 1 | 0 };fullscreen = { yes | no | 1 | 0 };height = number;left = number; location = { yes | no | 1 | 0 };menubar = { yes | no | 1 | 0 }; resizable = { yes | no | 1 | 0 }; scrollbars = { yes | no | 1 | 0 } ;status = { yes | no | 1 | 0 };titlebar = { yes | no | 1 | 0 };toolbar = { yes | no | 1 | 0 };top = number;width = number;*)
print()
//Print the current window document content
prompt([sMessage] [, sDefaultValue])
//Pop up the input dialog box
resizeBy(iX, iY)
//With Change the window size in a relative way
resizeTo(iWidth, iHeight)
//Change the window size in an absolute way
scroll(iX,iY)
Scroll window, the same effect as scrollTo, the method retained for compatibility reasons
scrollBy(iX, iY)
//Scroll the window in a relative manner
scrollTo(iX, iY)
//Scroll the window in an absolute manner
setActive()
//Activate the target without turning your gaze to the target
setInterval(vCode, iMilliSeconds [, sLanguage])
//Execute a piece of code regularly
setTimeout(vCode, iMilliSeconds, sLanguage)
//Delayed execution of a piece of code
showHelp(sURL [, vContextID])
//Open a help file, sURL is the help document address, vContextID is the help index No.
showModalDialog(sURL [, vArguments] [, sFeatures])
showModalDialog(sURL [, vArguments] [, sFeatures])
//Open a modal dialog box
//vArguments=need to Parameters passed by the newly opened modal dialog box
//sFeatures=(*dialogHeight:sHeight;dialogLeft:sXPos;dialogTop:sYPos;dialogWidth:sWidth;center:{ yes | no | 1 | 0 | on | off };dialogHide :{ yes | no | 1 | 0 | on | off };edge:{ sunken | raised };help:{ yes | no | 1 | 0 | on | off };resizable:{ yes | no | 1 | 0 | on | off };scroll:{ yes | no | 1 | 0 | on | off };status:{ yes | no | 1 | 0 | on | off };unadorned:{ yes | no | 1 | 0 | on | off };*)
showModelessDialog(sURL [, vArguments] [, sFeatures])
//Open a modeless dialog box
//vArgument=The parameters that need to be passed to the new modal dialog box
//sFeatures=(*dialogHeight:sHeight;dialogLeft:sXPos;dialogTop:sYPos;dialogWidth:sWidth;center:{ yes | no | 1 | 0 | on | off };dialogHide:{ yes | no | 1 | 0 | on | off };edge:{ sunken | raised };help:{ yes | no | 1 | 0 | on | off };resizable:{ yes | no | 1 | 0 | on | off };scroll:{ yes | no | 1 | 0 | on | off };status:{ yes | no | 1 | 0 | on | off };unadorned:{ yes | no | 1 | 0 | on | off };*)
** ******************************************
Full reference for execCommand( Chinese version)
document.execCommand(sCommand[, interaction mode, dynamic parameters])
2D-Position;document.execCommand("2D-Position","false","true");make absolute positioning The object can be dragged directly; ie5.5
AbsolutePosition;document.execCommand("AbsolutePosition","false","true");changes the object positioning to absolute positioning;ie5.5
BackColor;document.execCommand ("BackColor","false",sColor);Set the background color;ie4.0
BlockDirLTR;none;Make block-level elements layout from left to right?;Not support
BlockDirRTL;none;Make blocks The typesetting mode of level elements is from right to left?; Bold is not supported; document.execCommand("Bold", "false",null); Make the text in the selected area bold; ie4.0
BrowseMode;none; Set browsing Converter mode?;Copy is not supported;
document.execCommand("Copy","false",null);Copy the selected text to the clipboard;ie4.0 CreateBookmark;document.execCommand("CreateBookmark","false" ,sAnchorName);Set the specified anchor point as a bookmark;ie4.0
CreateLink;document.execCommand("CreateLink","false",sLinkURL);Convert the selected text into a hyperlink, if the second parameter is true, The parameter setting dialog box will appear; ie4.0
Cut;document.execCommand("Cut","false",null);Cut the selected text to the clipboard;ie4.0
Delete;document.execCommand( "Delete","false",null);Delete the selected text;ie4.0
DirLTR;none;The typesetting method is from left to right?;DirRTL is not supported;none;The typesetting method is from right to left?; Not supported
EditMode;none;Set edit mode?;Not supported
FontName;document.execCommand("FontName","false",sFontName);Change the font of the selected area;ie4.0
FontSize; document.execCommand("FontSize","false",sSize|iSize);Change the font size of the selected area;ie4.0
ForeColor;document.execCommand("ForeColor","false",sColor);Set the foreground color ;ie4.0
FormatBlock;document.execCommand("FormatBlock","false",sTagName);Set the tag name of the current block;ie4.0
**************** *********************************
How to add a page to a user’s favorites?
Favorite Script Home Script
************************************************
How Have the browser fail when saving a page?

********* ***********************************
How about the function of selecting all the check boxes on one page? accomplish?


                                                                                                                                         
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What is the difference between an HTML tag and an HTML attribute?What is the difference between an HTML tag and an HTML attribute?May 14, 2025 am 12:01 AM

HTMLtagsdefinethestructureofawebpage,whileattributesaddfunctionalityanddetails.1)Tagslike,,andoutlinethecontent'splacement.2)Attributessuchassrc,class,andstyleenhancetagsbyspecifyingimagesources,styling,andmore,improvingfunctionalityandappearance.

The Future of HTML: Evolution and TrendsThe Future of HTML: Evolution and TrendsMay 13, 2025 am 12:01 AM

The future of HTML will develop in a more semantic, functional and modular direction. 1) Semanticization will make the tag describe the content more clearly, improving SEO and barrier-free access. 2) Functionalization will introduce new elements and attributes to meet user needs. 3) Modularity will support component development and improve code reusability.

Why are HTML attributes important for web development?Why are HTML attributes important for web development?May 12, 2025 am 12:01 AM

HTMLattributesarecrucialinwebdevelopmentforcontrollingbehavior,appearance,andfunctionality.Theyenhanceinteractivity,accessibility,andSEO.Forexample,thesrcattributeintagsimpactsSEO,whileonclickintagsaddsinteractivity.Touseattributeseffectively:1)Usese

What is the purpose of the alt attribute? Why is it important?What is the purpose of the alt attribute? Why is it important?May 11, 2025 am 12:01 AM

The alt attribute is an important part of the tag in HTML and is used to provide alternative text for images. 1. When the image cannot be loaded, the text in the alt attribute will be displayed to improve the user experience. 2. Screen readers use the alt attribute to help visually impaired users understand the content of the picture. 3. Search engines index text in the alt attribute to improve the SEO ranking of web pages.

HTML, CSS, and JavaScript: Examples and Practical ApplicationsHTML, CSS, and JavaScript: Examples and Practical ApplicationsMay 09, 2025 am 12:01 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

How do you set the lang attribute on the  tag? Why is this important?How do you set the lang attribute on the tag? Why is this important?May 08, 2025 am 12:03 AM

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

What is the purpose of HTML attributes?What is the purpose of HTML attributes?May 07, 2025 am 12:01 AM

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

How do you create a list in HTML?How do you create a list in HTML?May 06, 2025 am 12:01 AM

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software