Студопедия

КАТЕГОРИИ:

АвтоАвтоматизацияАрхитектураАстрономияАудитБиологияБухгалтерияВоенное делоГенетикаГеографияГеологияГосударствоДомЖурналистика и СМИИзобретательствоИностранные языкиИнформатикаИскусствоИсторияКомпьютерыКулинарияКультураЛексикологияЛитератураЛогикаМаркетингМатематикаМашиностроениеМедицинаМенеджментМеталлы и СваркаМеханикаМузыкаНаселениеОбразованиеОхрана безопасности жизниОхрана ТрудаПедагогикаПолитикаПравоПриборостроениеПрограммированиеПроизводствоПромышленностьПсихологияРадиоРегилияСвязьСоциологияСпортСтандартизацияСтроительствоТехнологииТорговляТуризмФизикаФизиологияФилософияФинансыХимияХозяйствоЦеннообразованиеЧерчениеЭкологияЭконометрикаЭкономикаЭлектроникаЮриспунденкция

You need a HTML 3.0 compliant browser to view this page




</NOFRAMES>

With frames you can tell a certain link to appear in another frame, in another window, into a new blank window that is the same screen that the other frame was in, into itself, or into its parent frame (the frame above it in the frame set if there is nothing above it the link will just appear in the same frame). In order to get the link to appear in another frame you first need to name the other frame. Then you would enter a modifier in the A HREF command this modifier is the word TARGET then an equal sign “=” then the name of the frame. The source code for a link in a frame that is targeted into another frame called Main would look like this:

 

<A HREF=”temp.html” TARGET=”Main”>Temporary</A>

 

If you wanted the link to appear in a completely new window then you would enter a “magic” command after the equal sign “=” in the TARGET modifier, this command is an underscore “_” followed by the word blank. The final source for a link in a frame that opens a new window would look like this:

 

<A HREF=”temp.html” TARGET=”_BLANK”>Temporary</A>

 

If you wanted the link to appear in a new blank screen but not a new window then you would enter another magic modifier. This modifier is an underscore “_” followed by the word TOP. The final source code would look like this:

 

<A HREF=”temp.html” TARGET=”_TOP”>Temporary</A>

 

If you wanted the link to appear in the same frame that it is in you would use another magic modifier. This modifier is an underscore “_” followed by the word SELF. The final source code would look like this:

 

<A HREF=”temp.html” TARGET=”_SELF”>Temporary</A>

 

If you wanted the link to appear in the parent frame in it’s frame set you would use another magic modifier. This modifier is a underscore “_” followed be the word PARENT. The final source code would look like this:

 

<A HREF=”temp.html” TARGET=”_PARENT”>Temporary</A>

 

If you want all the links in a certain frame to be going to the same frame or magic link then you would enter, at the beginning of the document just after the body command or if you want before the first link, an angle bracket “<“ followed by the word BASE followed by the word TARGET followed by an equal sign followed by the name for the frame or the magic modifier followed by an angle bracket “>”. (Any base target can be overridden by the targets in the A HREF command.) The final source code for this base targeted to a frame named main would look like this:

 

<BASE TARGET=”Main”>

 

The same modifiers can be used in the IMAGE MAP command.

The Java (applet) Command

The next command that we will discuss is the command used to put a java applet on your page. Java is an object oriented programing language developed by Sun Microsystems. Java allows, theoretically, any program that can be used on a normal computer to be used over the internet. But since programs for a computer are quite large and if they were going to run over the internet they would eventually have to be downloaded, and this has not been done in great scale. However, there are a wide variety of applets that do anything from text manipulation to help you write other applets on the internet. Most of the authors of these applets let you have the source code. This will allow you to put that same applet on your page and most likely personalize it to do want you want it to do without having to learn the Java language.

In order to put a java applet on your page you must first make one, or find one on the internet. After you have done this you must enter the commands needed to run the applet on your web page. If you find an applet on the internet the author will most likely have a documentation that comes with the applet telling you how to put it on your page. I will tell you how to put a basic applet on you page. The first command that you will need to enter is an angle bracket “<“ followed by the word APPLET followed by modifiers followed by an angle bracket “>”. The modifiers that appear in the APPLET command are normally CODEBASE followed by an equal sign “=”. This modifier tells the browser what directory all the .class’s are in. The next modifier is usually CODE followed by an equal sign “=”. This modifier tells the browser which is the main .class that should be executed for this applet. WIDTH or/and HEIGHT followed by an equal sign “=” sometimes are included. This width and height works exactly like the one in the IMG SRC command. Another modifier that you can choose to include is ALIGN followed by an equal sign “=”. This lets you ALIGN the applet in the center, to the right, or to the left. Next comes a list of parameters that will be inserted run with the .class. These parameters are dependent on what the Java applet does. Parameters are recognized by an angle bracket “<“ followed by the words PARAM NAME followed by an equal sign “=” followed by the name of the command followed by the word VALUE followed by an equal sign “=” followed by where that parameter is located and ended by an angle bracket “>”. These parameters will either be given to you in the instructions on how to install the applet on your page or, if you wrote the applet, you should know them. Then the applet is ended with an angle bracket “<“ followed by a slash “/” followed by the word APPLET followed by an angle bracket “>”. The final source code for using an applet that I found on the internet called LED sign would look like this:

 

<applet codebase="/LED/Led" code="LED.class" height=48 align=center> 

<param name="script" value="/LED/scripts/Demo.led"> 

<param name="border" value="2">

<param name="bordercolor" value="100,130,130"> 

<param name="spacewidth" value="3">

<param name="wth" value="122">

<param name="font" value="/LED/fonts/default.font"> 

<param name="ledsize" value="3">

</applet>

 

But what if the person that is visiting your page does not have a browser that supports java? What will they see? Well if you leave the applet as shown they will see nothing but you can enter an alternative that the person will see. In order to do this, after you have decide what you want the person without java to see, you go to the document source and insert the HTML code of what you want the person to see after the last parameter and before the ending applet. This is very convenient if you want to put an ad for a browser that supports java and you don’t want the people with java to have to look at/download an ad for something that they already have. The final source code for the above applet with the alternative about downloading netscape would look like this:

 

<applet codebase="/LED/Led" code="LED.class" height=48 align=center> 

<param name="script" value="/LED/scripts/Demo.led">

<param name="border" value="2"> 

<param name="bordercolor" value="100,130,130">

<param name="spacewidth" value="3">

<param name="wth" value="122">

<param name="font" value="/LED/fonts/default.font">

<param name="ledsize" value="3">

To see this page at it’s best, download <A HREF=”http://home.netscape.com”>Netscape</A>.

</applet>

The Java (script) Command

The next command that we will discuss is the Javascript command. Javascript is very similar to Java but it is a little easier to work with because the entire program is contained in the source code of the document. When using java I sometimes get a class not found error and I have to go back and find were I mess up in my applet command. This error is not possible with Javascript. However, java is a great deal more advanced in the types of programs that are being written for it . Most Javascript programs are for doing simple things that normally do not require much programming. People have tried to do advanced programing with javascript but it is still more desirable to write advanced programs in java.

No matter what type of Javascript program you use on your page you still need to follow a basic set of commands for incorporating them into your page. The first thing that you must know is that almost all Javascript programs appear in the HEAD area so if you have a javascript program that is not working see if it is in the HEAD area. The second thing that you must know is that javascript programs sometimes have modifiers in the BODY command so this should be your second possible reason for a program that is not working. After you have taken care of that it is now time to write the program. For an example, I am using a program that displays certain text in place of the location when you hold your mouse over it. To start I will first tell the browser that I am going to use Javascript in my document. To do this I will enter an angle bracket “<“ followed by the words SCRIPT LANGUAGE followed by an equal sign “=” followed by the word Javascript followed by an angle bracket “>”. Because browsers that do not support Javascript cannot handle it, you should comment the entire script out so that only browsers that understand the script will use it. To do this you will enter the begin comment command at the beginning of the script and the end comment command at the end of the script. Then you will enter the Javascript. This book does not tell you how to write in Javascript so you will either enter a Javascript that the author of it said you could use or write one yourself. After you have entered the script you will end it with a command that is an angle bracket “<“ followed by a slash “/” followed by the word SCRIPT followed by an angle bracket “>”. The following script makes the location box say whatever you want it to. To do this the script puts a modifier in the A HREF command “onMouseOver” and in this command does not appear in the HEAD but in the body of the document. The Javascript with commands looks like this:

 

 

<script language="JavaScript">

<!-- Hide

function moveover(txt) {

window.status = txt;

setTimeout("erase()",1000000);

}

function erase() {

window.status="";

}

// -->

</script>

<A HREF="http://computing.net" onMouseOver="moveover('Why not visit Justin Weber’s Computing Center and get some help!');return true;">

Conclusion

This brings us to the end of this book. In this book I have discussed twenty eight commands that can be used to make HTML web pages. Thank you for reading this book I hope that you found the information in it useful.

 

Colors for the Web

Because of the fact that there are over sixteen million colors that can be used on the web I will tell you the basic colors and then you can mix them on your own. Be aware that the range of the hexadecimals that can be used stretches from 0-F.

 

Red:       FF0000

Blue:      0000FF

Green:     00FF00

Black:     000000

White:     FFFFFF

NOTE: If you know the name of the color that you wish to use you could try to enter it instead of a code. For example, if you wanted red you could enter it like this:

 

<BODY BGCOLOR="RED">

or like this:

<BODY BGCOLOR="FF0000">

© Justin Weber










Последнее изменение этой страницы: 2018-06-01; просмотров: 203.

stydopedya.ru не претендует на авторское право материалов, которые вылажены, но предоставляет бесплатный доступ к ним. В случае нарушения авторского права или персональных данных напишите сюда...