英文文獻(xiàn)翻譯1.doc_第1頁(yè)
英文文獻(xiàn)翻譯1.doc_第2頁(yè)
英文文獻(xiàn)翻譯1.doc_第3頁(yè)
英文文獻(xiàn)翻譯1.doc_第4頁(yè)
英文文獻(xiàn)翻譯1.doc_第5頁(yè)
已閱讀5頁(yè),還剩16頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

東北石油大學(xué)本科畢業(yè)設(shè)計(jì)(英文文獻(xiàn))Chapter 1 Professional Active Server Pages 3.0The WWW (World Wide Web, WWW) originated from the Swiss-based CERN laboratory. Tim Berners-Lee and his development team spent a lot of time. established a certain format to the transmission of information, This is known as the Hypertext Transfer Protocol (HTTP). The agreement to use the HTML (HTML). HTML simple, flexible structure, We allowed b browsers and other compatible applications show text and images. Some parts of the document could become hyperlinks, that is, when they are chosen, can show different pages of the same or different parts of the pages. Markup Language is separated from the specific character of the basic elements, designated basic elements included in the text or other article shows how. For example, This is some Emphasized text. HTML is a broad-based standard general markup language (Standard Generalized M akeup Language, SGML) markup language. SGML is a description language, its own website is not to be used for creating the language. HTML from simple language, the increasing number of additional features, So today the formation of the HTML version 4.0. These new properties provide a more flexible text font styles (such as FONT), and and the output page layout more control (such as Window and frame). Early website is the lack of dynamic content. Just a beginning, this is not a problem because THLM to the development of the computer, network and operating system between display and transmission of information (in particular the technical and scientific information). This standardized document is only a simple text and markings The images and other non-text content in a separate document storage, they can freely various network transmission. In addition, the format of the information is fixed, and its constituent elements is the meaning of the THLM definition good. For a reading or browser applications, using any programming language on any platform or operating system is relatively easier to achieve. As long as the establishment of these information website, text documents and images through the We b server application delivery to users, We b server applications simply read from the disk and put their output into the network to the correct transmission HTTP agreement. The client or the client, browser receiving and transmitting the information flow, and to switch to show the pages. HTML and HTTP addition to cross-platform properties, its main strengths is its documentation can include the contents of the relevant information, the author expressed the desire pattern. It can be read applications and not necessarily show : for example, the blind can use special procedures it has become a voice. Similarly, its contents will show special way to those poor eyesight or other defects it easier for a visit. Therefore, Technology industry often user agent (user agent) to replace the generic term browser (b r o w e r s). New types of files, especially those designed to allow the importation of pages of information on a document (for example, HTML PUNIT the window - Control), a development which can be read to and use of information applications inevitable. Obviously, the transfer from other applications obtained, in particular, a specific type of the content of the database, the need for a new approach. Each one based on the need to rewrite the text of the pages, providing real-time strong message is certainly not an ideal solution. Web servers for example, provide an interface so that other applications can be linked with a common interface through this method, Customization of the executable can receive from the clients information, including through hyperlinks or click on the browser type uniform resource locators (URL) of the details of the request pages . Application procedures for client requests to generate the corresponding responses, but not from the server disk read text or document markers. These early methods from the beginning, and gradually form a complete series of methods to create dynamic website in response to user requests or information changes. Application procedures for these interfaces are still in use, was known as the Common Gateway Interface (Common GatewaInterface, CGI), This is a available in any language (such as C) to achieve the standard. It arises from the use of those c g i-b i n directory application (here, b, i n represents the binary code, instead of text). Early applications are compiled after the procedure, usually in C or C+ preparation. However, this naturally know the C programming language, Whenever the right procedures and do very little writing or markings on the changes, we must recompile, re-generate executable files, which limits the C and GI use dynamic pages. Instead, the development of a scripting language used to create Web pages, Such language is useful summary and report language (Practical Extraction and Re porting Language), or referred to as Perl It allows information to the founders of a very simplified similar to C or C + + language code. Perl script, it reads text and markings use standard input (sintd) and the standard output (s t u d o t) function through the C and G I. We b server links General output to the browser. Per b We still is a popular language, particularly in the UN-based X - or L I i n u x systems. However, this language captures up is not very easy. especially for those who are not C or C+ language based on the Web especially developers. Now, some new scripting language emerged, and make the website more easily. We mainly look at how they enable developers to work more easily. 1.1 Server-side scripting technologyFor the server-side scripting needs some type of intermediate applications, or plug-in procedure to connect. It must be able to accept the request of users, read and explained to the appropriate server based on the script file, and then create the output pages, We also transmitted to the server, where as a response sent to the client. In some cases, this task is divided into two parts : an application or plug-in procedures with the We b communication between the server (usually C through GI). Another dealt with the interpretation and implementation of the script. This is PSA of the situation, the script engine used in other circumstances the same. Perl is a popular server-side scripting language, but now there are a lot of other languages. In the UN and on I-L i n u x system, A new called PHP (Personal Home Page) the language is becoming increasingly popular. Some language is the goal of some specific types of users, For example, TCL is a scientific environment in the complex arithmetic simplistic language. 1.2 Microsofts technology to create dynamic pages With Microsoft Windows NT 3.51 launched their We b server software FAQ, I nformation Server (IIS 1.0. This is one of many functions of a certain standard The software, it supports C G. I. But Microsoft also offers an interface, allowing the use of C and C + + language compiler, such as generating executable files, make operations more efficient. This is Internet Server Application Programming Interface (Internet Ser ver Application Programming Interface, ISAPI). It can provide than traditional P e r l engines and other technology-dependent s t i n d and s t o d u t broader We b server to visit. Since then Microsoft and other third party developers through the introduction of many AP S connect to the S software application, This is why A P S can connect to the I I S, as well as other Microsoft server Dynamic Technology. APS in the past, the most widely used is Inettern Database Connectivity (Internet Database Co. nnector. IPC). A S P We b developers to use Microsofts platform opened up a new vista, This enables the data in the database to create dynamic web easier. In particular, it has introduced a template (template ), which includes an insert with a database query to the results of the text and marking the template files.Chapter 2 JavaScript2.1 whats JavaScriptJavaScript is used in millions of Web pages to improve the design, validate forms, detect browsers, create cookies, and much more. JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Mozilla, Firefox, Netscape, Opera. Before you continue you should have a basic understanding of the following:JavaScript was designed to add interactivity to HTML pagesJavaScript is a scripting language (a scripting language is a lightweight programming language)A JavaScript consists of lines of executable computer codeA JavaScript is usually embedded directly into HTML pagesJavaScript is an interpreted language (means that scripts execute without preliminary compilation)Everyone can use JavaScript without purchasing a licenseJavaScript gives HTML designers a programming tool HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small “snippets” of code into their HTML pages JavaScript can put dynamic text into an HTML page A JavaScript statement like this: document.write(” + name + “”) can write a variable text into an HTML page JavaScript can react to events A JavaScript can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element JavaScript can be used to validate data A JavaScript can be used to validate form data before it is submitted to a server, this will save the server from extra processing JavaScript can be used to detect the visitors browser A JavaScript can be used to detect the visitors browser, and depending on the browser load another page specifically designed for that browser JavaScript can be used to create cookies A JavaScript can be used to store and retrieve information on the visitors computer 2.2 VariableA variable is a “container” for information you want to store.Variables are used to store data. This example will show you how.A variable is a “container” for information you want to store. A variables value can change during the script. You can refer to a variable by name to see its value or to change its value. Rules for variable names:Variable names are case sensitiveThey must begin with a letter or the underscore character IMPORTANT! JavaScript is case-sensitive! A variable named strname is not the same as a variable named STRNAME!You can create a variable with the var statement:You can also create a variable without the var statement:Assign a Value to a VariableYou can assign a value to a variable like this:strname = “Hege”The variable name is on the left side of the expression and the value you want to assign to the variable is on the right. Now the variable “strname” has the value “Hege”. Lifetime of VariablesWhen you declare a variable within a function, the variable can only be accessed within that function. When you exit the function, the variable is destroyed. These variables are called local variables. You can have local variables with the same name in different functions, because each is recognized only by the function in which it is declared.If you declare a variable outside a function, all the functions on your page can access it. The lifetime of these variables starts when they are declared, and ends when the page is closed.JavaScripts in the body section will be executed WHILE the page loads.JavaScripts in the head section will be executed when CALLED.Head section Scripts that contain functions go in the head section of the document. Then we can be sure that the script is loaded before the function is called.Body section Execute a script that is placed in the body section.2.3 Where to Put the JavaScript JavaScripts in a page will be executed immediately while the page loads into the browser. This is not always what we want. Sometimes we want to execute a script when a page loads, other times when a user triggers an event. Scripts in the head section: Scripts to be executed when they are called, or when an event is triggered, go in the head section. When you place a script in the head section, you will ensure that the script is loaded before anyone uses it. Scripts in the body section: Scripts to be executed when the page loads go in the body section. When you place a script in the body section it generates the content of the page. Scripts in both the body and the head section: You can place an unlimited number of scripts in your document, so you can have scripts in both the body and the head section.Using an External JavaScript.Sometimes you might want to run the same JavaScript on several pages, without having to write the same script on every page.To simplify this, you can write a JavaScript in an external file. Save the external JavaScript file with a .js file extension. Note: The external script cannot contain theNote: Remember to place the script exactly where you normally would write the script!2.4 JavaScript functionA function is a reusable code-block that will be executed by an event, or when the function is called.How to call a function.Function with arguments.How to pass a variable to a function, and use the variable in the function.Function with arguments How to pass variables to a function, and use these variables in the function.Function that returns a value.How to let the function return a value.A function with arguments, that returns a value.How to let the function find the product of 2 arguments and return the result.2.5JavaScript Functions To keep the browser from executing a script as soon as the page is loaded, you can write your script as a function.A function contains some code that will be executed only by an event or by a call to that function.You may call a function from anywhere within the page (or even from other pages if the function is embedded in anexternal .js file).Functions are defined at the beginning of a page, in the section.Examplefunction displaymessage()alert(Hello World!)If the line: alert(”Hello world!”), in the example above had not been written within a function, it would have been executed as soon as the line was loaded. Now, the script is not executed before the user hits the button. We have added an onClick event to the button that will execute the function displaymessage() when the button is clicked. You will learn more about JavaScript events in the JS Events chapter.How to Define a Function.The syntax for creating a function is:function functionname(var1,var2,.,varX)some code var1, var2, etc are variables or values passed into the function. The and the defines the start and end of the function. Note: A function with no parameters must include the parentheses () after the function name:function functionname()some code Note: Do not forget about the importance of capitals in JavaScript! The word function must be written in lowercase letters, otherwise a JavaScript error occurs! Also note that you must call a function with the exact same capitals as in the function name.The return statement is used to specify the value that is returned from the function.So, functions that are going to return a value must use the return statement.ExampleThe function below should return the product of two numbers (a and b):function prod(a,b)x=a*breturn xWhen you call the function above, you must pass along two parameters:product=prod(2,3)The returned value from the prod() function is 6, and it will be stored in the variable called product.2.6 JavaScript For loopsLoops in JavaScript are used to execute the same block of code a specified number of times or while a specified condition is true.How to write a for loop. Use a For loop to run the same block of code a specified number of times.Looping through HTML headersHow to use the for loop to loop through the different HTML headers.Very often when you write code, you want the same block of code to run over and over again in a row. Instead of adding several almost equal lines in a script we can use loops to perform a task like this.In JavaScript there are two different kind of loops.For - loops through a block of code a specified number of times.While - loops through a block of code while a specified condition is trueThe for loop is used when you know in advance how many times the script should run.for (var=startvalue;var=endvalue;var=var+increment) code to be executedExplanation: The example below defines a loop that starts with i=0. The loop will continue to run as long as i is less than, or equal to 10. i will increase by 1 each time the loop runs. Note: The increment parameter could also be negative, and the = could be any comparing statement.var i=0for (i=0;i=10;i+)document.write(The number is + i)document.write()ResultThe number is 0The number is 1The number is 2The number is 3The number is 4The number is 5The number is 6The number is 7The number is 8The number is 9The number is 102.6 JavaScript objectsObjects are useful to organize information.Create a direct instance of an objectCreate a template for an objectEarlier in this tutorial we have seen that JavaScript has several built-in objects, like String, Date, Array, and more. In addition to these built-in objects, you can also create your own. An object is just a special kind of data, with a collection of properties and methods.Lets illustrate w

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論