Current location - Quotes Website - Signature design - Common code technology of web page making
Common code technology of web page making
1, Q: How can I save the background music on someone else's webpage?

A: After browsing this webpage, you can find the cache file of background music in your Windows\Temporary Internet Files folder and copy it for use. If you still can't find the file, you can open the source file of the webpage, find the URL path of the music file, and download it with FTP software such as Ant.

2. Q: Prevent someone from entering the website directly from the frame of your frame home page instead of from index.htm?

A: add the following script code between < head > and of the webpage in the frame:

< scripting language = "JavaScript" >

if (top==self)

self . location . href = " index . htm ";

の/Script \

In this way, when someone enters the website from a frame, they will be automatically redirected to the home page file index.htm.

3. Q: How to prevent others from putting your webpage in the frame?

A: Because of frames, many people put other people's web pages into their own frames and make their own pages. If you want to stop others from doing this, you can add the following JavaScript code, which will automatically monitor and then jump out of others' box.

< scripting language = "JavaScript" >

If (ego! = top)

top . location = self . location;

の/Script \

4. Q: How to add Flash animation in FrontPage2000?

A: In FrontPage2000, click [Insert]-> [Advanced]-> [Plug-in], in the pop-up window, set the size of the Flash file and other information, and then confirm.

5. Q: How do I add comments to a webpage?

A: In the development of * * * web pages, comments are added to prevent confusion in division of labor or to comment on the special meaning of a code. The format for adding comments is:

〈! -[note ...]->

6. Q: How to test the browser and automatically load the required web pages?

A: At present, Microsoft and Netscape browser are not completely compatible with all web pages. Some web pages are very beautiful in one browser, but they are a mess when viewed in other browsers. If you need to test the browser, you can add the following JavaScript code to make the browser automatically load the required web pages:

< scripting language = "JavaScript" >

Function TestBrowser ()

{

ie =((navigator . appname = = " Microsoft Internet Explorer ")& amp; & amp(parse int(navigator . appversion)& gt; = 3 ))

ns =((navigator . appname = = " Netscape ")& amp; & amp(parse int(navigator . appversion)& gt; = 3 ))

if(ns){ setTimeout(" location . href = " ns . htm " ", 10); }

else { setTimeout(" location . href = " ie . htm " ", 10); }

}

の/script \

7. Q: How can I make the link not underlined?

A: As long as you add the following code in < head >, all links will be underlined:

〈style type="text/css"〉

〈! -

{ text-transform:none; Text-Decoration: None; }

A:hover {text-decoration: underline}

- 〉

﹔/style﹔.

8. Q: How to add an email link to a web page and display a predetermined topic?

A: A href="mailto:Emailhost@263.net? Subject= theme " > ...

9. Q: How to keep the background picture of the webpage from scrolling?

A: the Internet Explorer browser supports a Body property bgproperties, which can prevent the background from scrolling:

< body background = " image file " BG properties = " fixed " >

10,Q; How to define keywords of web pages?

A: Adding keywords to web pages can be used by some search platform robots. They will use this keyword to index your website, so that when others search the website with this keyword, if your webpage contains this keyword, it can be listed. To define keywords for this page, you can add the following code in < head >:

meta name="Keywords" c

The content contains keywords, which can be set by yourself.

Here is a trick, you can repeat a word, which can improve the ranking position of your website, such as:

meta name="Keywords" c

1 1, Q: How can I hide the link information that appears in the status bar?

A: As we all know, when you point to a link, the information of the link will appear in the status bar of the browser. If you need to hide it, you can make the following settings in this link:

a href="passlabs.com).

18, Q: What is an ActiveX control?

A: Microsoft ActiveX control is a reusable software component developed by a software provider. Using ActiveX controls, you can quickly add special features to websites, desktop applications and development tools. For example, the StockTicker control can be used to immediately add active information to a web page, while the animation control can be used to add animation functions to a web page.

There are currently more than 1000 commercial ActiveX controls. You can use various programming languages to develop controls, such as C, C++, next generation Microsoft Visual Basic, Microsoft Visual Java development environment Microsoft Visual J++. ActiveX control 1

After the development is completed, designers and developers can use it as a pre-assembled component to develop customer programs. Using ActiveX controls in this way, users don't need to know how these components are developed. In many cases, they can even complete web pages or applications without programming themselves.

Design of sequence.

IE3.0 is the first web browser to support ActiveX controls in web pages. You can also use ActiveX plug-in for Netscape to display ActiveX controls in Mosaic and Netscape Navigator (see passlabs.com).

19, Q: Can Netscape Navigator display ActiveX controls?

A: Yes, you can use the ActiveX plug-in of Netscape to display ActiveX controls in Netscape Navigator. The beta version of the plug-in can be obtained from the website of Ncompass Lab in passlabs.com/..

20. Q: What tools now support the use of ActiveX controls for web development?

A: Using ActiveXControlPad (see /workshop/author/cpad/), developers can easily insert ActiveX controls into HTML pages. According to/workshop/author/CPAD/tutorial-f.htm.

With the ActiveX ControlPad tutorial on the website, developers can easily learn to use ActiveX Control Pad. SoftQuad's HoTMetaL Pro also supports the use of ActiveX controls on HTML pages. In the future, Microsoft and its third-party software vendors will also launch many web production tools that support the use of ActiveX controls to make web pages.

2 1, Q: Can only programmers use ActiveX controls?

A: Understanding scripting languages, such as Visual Basic Scripting Edition (VBScript) or JavaScript, is naturally helpful for using ActiveX controls. But you don't have to have such a program development foundation. For some controls, it is necessary to write a certain number of scripts to integrate into web pages, but most ActiveX controls do not need this. Using ActiveX Control Pad, even non-program developers can insert many controls into a web page by simple selection and click.

22. Q: After creating a webpage containing ActiveX controls, if users browse the webpage on their own machines, how are the controls installed and displayed on the user terminal?

A: When IE3.0 encounters a webpage containing ActiveX controls (or composite controls), it first checks the user's local system registration to see if the components have been installed on the local machine. If the component is already on the local computer, IE3.0 will display the web page and activate the control. If the control is not installed on the user's local machine, IE3.0 will automatically find the control from the Internet and install it on the local machine according to the address definition when the developer creates the webpage.

23. Q: How to define an address on a webpage so that the control can be automatically downloaded to the user's computer when the user visits the webpage?

A: Web developers can provide the above information by setting the CODEBASE property of the control. When using ActiveX Control Pad, you can see a property sheet in ObjectEditor, which developers can easily use to set properties. By setting the property, you can define a URL address or address set, through which you can find and download controls on the Internet. IE3.0 uses these address information to locate controls and automatically download components. After downloading, the webpage appears on the local machine. In July, 1996, Microsoft system magazine, the article "Using Internet component download service to surf the Internet safely" discussed the whole information positioning and downloading process in detail. It should be mentioned that many Microsoft-provided controls (such as HTML layout controls) do not need the CODEBASE setting, because the ActiveX object index can automatically find and locate controls according to CLSID (unique identifier of controls).

24. Q: Will users be notified when downloading ActiveX components?

A: Yes. When a component needs to be downloaded, IE will display a message box by default to inform the user that the download will start. Users can choose to terminate the download or continue the download. If the control has been digitally signed, a digital certificate will be provided, including the name of the software vendor providing the control and related information, to confirm that the control has not been destroyed. Software developers can make digital signatures when developing controls. The signature information is carried by the control itself, so before downloading, the digital verification book will be automatically displayed, and users who use the control on the web page do not need to do any development work.

25. Q: Where do you put the ActiveX control after downloading?

A: By default, downloaded controls should be placed in the ActiveX control cache in the \ Windows \ Downloaded Program Files directory.