Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the practical HTML special effects codes?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the practical HTML special effects code, the article is very detailed, has a certain reference value, interested friends must read it!

one. Ignore the right button

Or

two. Add background music

IE:

NS:

*. Mid your background music in midi format

three. Simple window.open method

Words or pictures

Parameter explanation:

Js script starts

Window.open command to pop up a new window

File path / file name the file name of the pop-up window

The name of the newwindow pop-up window (not the file name), which is optional and can be replaced by null

Width=400 window width

Height=300 window height

The pixel value of the top=0 window from the top of the screen

The pixel value of the left=0 window from the left side of the screen

Whether the toolbar is displayed by toolbar=no, or not by yes.

Menubar,scrollbars represents the menu bar and scroll bar.

Whether resizable=no is allowed to change the window size, yes is allowed.

Whether location=no displays the address bar. Yes is allowed.

Whether status=no displays the information in the status bar (usually the file is already open). Yes is allowed.

End of js script

four. Simple page encryption

five. The background image does not move when the page is pulled

Body {background-image:url (logo.gif)

Background-repeat:no-repeat;background-position:center}

six. Let the browser fail to save the page

seven. Randomly replace pictures

[xss_clean] (

The picture file is called 0.gif 1.gif 2.gif 3.gif 4.gif

eight. The window closes regularly.

First, put the following code into the area of the web page file:

Function closeit () {setTimeout ("self.close ()", 10000) / / Ms}

Then add in the bid, such as:

nine. The web page closes automatically

This window will automatically close after 10 seconds, and there will be no prompt.

ten. Automatic refresh of web page

Enter in the head section

Among them, 20 is automatically refreshed after 20 seconds, and you can change it to any value.

eleven. Automatic page turning of web pages

twelve. Keep layer at the front without being overwritten by Iframe and Object

Insert Iframe or Object into Layer to set z-Index value

# Front

# behind

Height=100% width=100% >

thirteen. Return to the previous page

"return to the previous page"

fourteen. Close the window

"close window"

fifteen. About the transparent background of iframe

16. Completely block the right mouse button

Oncontextmenu= "window.event.returnValue=false" will completely block the right mouse button

No can be used for Table

17. Deselect, prevent copying

18. No pasting.

Onpaste= "return false"

19. Prevent replication

Oncopy= "return false;"

20. Replace the IE address bar with your own icon

21. You can display your icon in your favorites

twenty-two。 Turn off the input method

23. Will always carry a frame.

24. To prevent being frame.

25. The web page cannot be saved as

twenty-six。 View the web page source code

twenty-seven。 Confirm when deleting

Delete

twenty-eight。 Screen function key Shift,Alt,Ctrl

Function look () {

If (event.shiftKey)

Alert ("Don't press shift!" ); / / can be converted to ALT CTRL

}

_ document.onkeydown=look

twenty-nine。 Web pages will not be cached

Or

thirty。 How to make a form without bump and concavity?

Or

thirty-one。 No scroll bar?

Let the vertical bar not:

Let the stripes not:

Get rid of both? It's easier.

thirty-two。 How to remove the dotted line around the picture after the picture link is clicked?

thirty-three。 Email processing submission form

thirty-four。 How to write in the code that refreshes the parent window in the open child window?

Window.opener.location.reload ()

thirty-five。 How to set the size of the open page

Where to open the page

thirty-six。 How to add a background picture that is not full on the page, and the background image remains unchanged when the page is pulled.

Body

{background-image:url (logo.gif); background-repeat:no-repeat

Background-position:center;background-attachment: fixed}

thirty-seven。 Check whether a string consists entirely of numbers

thirty-eight。 Get the size of a window

Document.body.clientWidth; document.body.clientHeight

thirty-nine。 How to tell whether it is a character or not?

If (/ [^ / x00-/xff] / g.test (s)) alert ("containing Chinese characters")

Else alert ("all characters")

How many lines of text are adaptive to 40.TEXTAREA?

forty-one。 Date minus days equals second date

Function cc (dd,dadd)

{

/ / error handling can be added

Var a=new Date (dd)

A=a.valueOf ()

Apoca-dadd * 24 * 60 * 60 * 1000

A=new Date (a)

Alert (a.getFullYear () + year + (a.getMonth () + 1) + month + a.getDate () + day)

} cc ("12 Compact 23 Compact 2002", 2)

forty-two。 Which Radio is selected?

Function checkme ()

For each ob in radio1

If ob.checked then window.alert ob.value

Next

End function

Style

Barcode

forty-three。 Scripts never go wrong.

The 44.ENTER key moves the cursor to the next input box

forty-five。 Test the link speed of a website:

Add the following code to the area:

Tim=1

SetInterval (tim++, 100)

Bust 1

Var autourl=new Array ()

Autourl [1] = ""

Autourl [2] = "javacool.3322.net"

Autourl [3] = ""

Autourl [4] = ""

Autourl [5] = ""

Function butt () {

[xss_clean] (")

For (var iTune1, investors i200)

{document.forms [0] ["txt" + b] .value = "Link timeout"}

Else

{document.forms [0] ["txt" + b] .value = "time" + tim/10+ "seconds"} baked +}

Function

Run () {for (var item1teri)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report