Home > Web Front-end > JS Tutorial > Summary of common tips for web coding_javascript skills

Summary of common tips for web coding_javascript skills

PHP中文网
Release: 2016-05-16 19:06:12
Original
907 people have browsed it

1. Let the browser window never have scroll bars.

or or
2. No horizontal scroll bar

3. No vertical scroll bar

2. How to dither an image.




< p class="font1" style="writing-mode=tb-rl;height:200px" width=300>

Shengxia Shangtao

A night of exposed yellow powder fragrance Yuan Yunfu

Yaochi was newly cooled last night Wang Jinling

A white lotus bloomed at will Wu Guannan

New rain welcomes Autumn desire fills the pond and brings together the people. ;/html>


15. IE6 already supports custom cursor!

Syntax format cursor:url (icon) //cur or ani file.
cur is WINDOWS The cursor file in the cursor file is actually the same as the icon (ICON) file except that the value of one position in the file header is different.
ani is an animated cursor (icon) file in WINDOWS.



Underline link


< a href="#" class="r1">Double underline link


Additional explanation:
a:hover means The style when the mouse moves over.
a:link represents the style of the link.
a:active represents the style of the currently active link.
a:visited represents the style of the visited link.

25. Use CSS to add shadow effects and text stroke effects to text.

.glow{FONT-SIZE: 9pt; FILTER: Glow(Color=#000000, Strength=1)}
//Text stroke effect
.shadow {FONT-SIZE: 9pt; FILTER: DropShadow(OffX=1, OffY=1, DropShadow(OffX=1, OffY=1, color:#111111); COLOR: #ffffff; FONT-FAMILY: "宋体"}
//Add shadow effect
Additional instructions:
To achieve the effect, these two filters must be added to:

xxxxxxxxx


, and leave enough space to display shadow or stroke, otherwise there will be half shadow or stroke phenomenon.

 26. How to make a colored drop-down menu.

 27. Regarding the problem of bright and dark borders in DW4 tables.

There are no property settings for bright and dark borders in the table panel of DW4, because NC does not support them, so you can only add them in the code.
bordercolorlight="#999999" bordercolordark="#000000"
You can also use Css to define a class. For example:

Then add ?lt;table class= in the table where you want to add the effect "bordercolor">

28, automatically displays the last updated date of the homepage.

<script> <br>document.write("Last updated date: " document.lastModified "") <br></script>

 29. How to make the scroll bar appear on the left?

I think someone actually posted this code in the forum. It's very interesting. It does take care of some lefties, haha!





Is your scroll bar on the left?< ;/td>

icon?

First of all, you must understand that the so-called icon (Icon) is a special graphic file format with .ico as the extension. You can find an icon-making software on the Internet, which has unique specifications: the size of the icon is 16 * 16 (in pixels); the color must not exceed 16 colors. Add the following content to the HEAD section of the web page file: and place it in the root directory of the web page .

31. How to prevent horizontal scroll bars from appearing on the web page on an 800*600 display!

Set to , the table width in the web page is 778.

32. Explanation on .

In web pages, you often see , which is the version information that declares the HTML file.

 33, Use pictures to close the form.

 Close window
Additional explanation: How to use ACTIVEX! , no more warning windows?


classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" >


Close the window without prompt



 34. It is forbidden to right-click the mouse to view the source code of the web page.


Supplementary instructions:
The mouse is completely blocked, and the right mouse button and web page text can be blocked.
< body oncontextmenu="return false" ondragstart="return false" onselectstart="return false">

35. Use the button to view the source code of the web page.



36. How to use text links to implement the SUBMIT function of buttons?

OK
This text should be placed in the form. formname is the name to be written in the form here,
then it should be form111.submit()

 37. How to make an empty link?
Add #

38. Use
src="iframe.html"
Used to display the source of the web page in