Unformatted text preview:

Using the ComputerSlide 2Slide 3Slide 4Some Notes on Programming LanguagesIntroduction to HTMLStructure of HTMLSlide 8Slide 9Slide 10“Hello, World!”An HTML ExampleIntroduction to JavaScriptA JavaScript ExampleGetting Started with JavaScriptOutput of Results with JavaScriptUsing the Computer•Turning it on – Your computers in the lab should be turned on, but if you arrive and the screen is blank, do the following:–Hit the return key to make sure the machine is not in power-saving mode–Ask the lab instructor if the machine is turned off for a reason, like repairs–Make sure it is plugged in.–Press power button for the computer – probably in the middle front of the tower.–Press power button for the monitor – probably below the screen.•Turning it off (do one of the following and follow the instructions)–Use the START button and select SHUT DOWN.–Use ALT-CTRL-DELETE–Unplug it•Breaking it–You can’t break the machine by typing anything wrong or turning it off or on.–You can break it by forcing floppy discs into the wrong places.Using the Computer•Turning it off – you shouldn’t have to do turn the machine off during lab unless it stops responding completely. You will want to log off at the end of lab, though. Do one of the following and follow the instructions the machine provides.–Click the START button (lower left corner of screen) and select SHUT DOWN. Then select “shut down”, “restart”, or “log off” from the menu.–Use ALT-CTRL-DELETE then follow directions (particularly if the machine has stopped responding) –Unplug it – last resort, ask lab instructor first.•Breaking it–You can’t break the machine by typing anything wrong or turning it off or on.–You can break it by forcing floppy discs into the wrong places.Using the Computer•Breaking it – its pretty hard to break it.–You can’t break the machine by typing anything wrong or turning it off or on. So don’t worry about experiementing with your programs. A good way to learn things like JavaScript is to say “I wonder what happens when I do THIS.” and then go do it. The worst that can happen is that you have to restart the machine. –Deleting important files. This is possible, but hard to do by accident. You should always keep the lab machines free of your assignments. Bring floppy disks to lab to store your files on, or transfer them to Pegasus and then delete them from the lab machine. When you delete files, the machine will ask you if you are sure you want to do it. Be careful at this point – just verify that only the files you want deleted are selected before you hit the “ok” button.–You can break it by forcing floppy discs into the wrong places.Using the Computer•Finding Files–Use the “Find files” feature if you know the file name. Click “Start” and then “Find”.–A quicker way (usually) is to traverse the directory structure using “My Computer” icon. Double click on the icon and then maneuver your way around the directory structure with more clicking. For the most part, you will only need to go to the “A:” directory (the floppy disk) and the Desktop.•Editing files–The main thing is to remember that your files must be text only. In other words, using MS Word with the default save settings will not work. My favorite program for editing in a text-only mode is Notepad. It comes standard on MS machines (usually click on Start, then Programs, then Accessories then Notepad).–You may use any other editor you like, but make certain it saves in plain text format.Some Notes on Programming Languages•Syntax – the mechanical way that programs can be assembled–Programming languages are very specific about syntax–This means that putting in a single quote ‘ where a double quote “ should be can ruin your entire program. –Putting a square bracket [ where a parenthesis ( should be can ruin your entire program. –This can be frustrating. –Capitalization almost always counts. Be conscious of things like that. –Many things come in pairs (quotation marks, parenthesis for example). Make sure that things that should be in pairs are.–If your program does absolutely nothing, you probably have a small syntax error. –If your program does something, but its wrong, then you probably have an error in your logic when you designed the program.Introduction to HTML•HTML = Hypertext Markup Language Language•HTML is –A very weak computational language (basically nil).–An interpreted language (interpreted by the browser).–Designed specifically to tell browsers how to display web pages.–Requires a browser for the page to be displayed.–Can only suggest display preferences to the browser (this surprises a lot of people).Structure of HTML•HTML uses tags to suggest how to display items on a page–Learning HTML is really about learning how to use the tags.–Makes it easy to do useful pages quickly.•Most tags come in pairs:–<tag> starts the action–</tag> stops the action–Example: <HTML> begins all html documents and </HTML> ends them–Example: <center>Title</center> will center the word “Title” on the page.•Some tags do not come in pairs:–<br> is a line break, causing the display to continue on a new line–<hr> inserts a horizontal rule (line) across the page.Structure of HTML•Anything that is not specified by tags is displayed per the browsers preference–Adding extra spaces in between words won’t have any effect on the page.–Putting things on a new line won’t have any effect on the displayed web page (the <BR> tag does that).•Example: – “Hello, World.” and “Hello, World.” will look the same.–“Hello, World.” and “Hello, World.” will both be shown on the same line.Structure of HTML•There are 4 tags required in any HTML document.–<HTML></HTML> Tells the browser where the web page starts and stops–<HEAD></HEAD> Tells the browser where the informational portion of the web page starts and stops–<BODY></BODY> Tells the browser where the displayed portion of the web page starts and stops–<TITLE></TITLE> Tells the browser what title to display for this page.Structure of HTML<HTML><HEAD><TITLE>Example of HTML structure</TITLE></HEAD><BODY></BODY></HTML>Information hidden from the viewer.Visible web page.“Hello, World!”•There is a particular, simple program called “Hello, World!” that many CS people use when first


View Full Document

UCF COP 2500C - Lecture Notes

Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?