tailieunhanh - Publishing AJAX and PHP - part 4

JavaScript và Document Object Model Như đã đề cập trong chương 1, JavaScript là trái tim của AJAX. JavaScript có cú pháp tương tự như các ngôn ngữ C tốt cũ. JavaScript là một ngôn ngữ phân tích cú pháp (không được biên dịch), và nó có một số trình hướng đối tượng (OOP) khả năng. | Client-Side Techniques with Smarter JavaScript JavaScript and the Document Object Model As mentioned in Chapter 1 JavaScript is the heart of AJAX. JavaScript has a similar syntax to the good old C language. JavaScript is a parsed language not compiled and it has some Object-Oriented Programming OOP capabilities. JavaScript wasn t meant for building large powerful applications but for writing simple scripts to implement or complement a web application s client-side functionality however new trends are tending to transform JavaScript into an enterprise-class language it remains to be seen how far this will go . JavaScript is fully supported by the vast majority of web browsers. Although it is possible to execute JavaScript scripts by themselves they are usually loaded on the client browsers together with HTML code that needs their functionality. The fact that the entire JavaScript code must arrive unaltered at the client is a strength and weakness at the same time and you need to consider these aspects before deciding upon a framework for your web solution. You can find very good introductions to JavaScript at the following web links http http javascript http js Part of JavaScript s power on the client resides in its ability to manipulate the parent HTML document and it does that through the DOM interface. The DOM is available with a multitude of languages and technologies including JavaScript Java PHP C C and so on. In this chapter you will see how to use the DOM with both JavaScript and PHP. The DOM has the ability to manipulate create modify parse search etc. XML-like documents HTML included. On the client side you will use the DOM and JavaScript to Manipulate the HTML page while you are working on it Read and parse XML documents received from the server Create new XML documents On the server side you can use the DOM and PHP to Compose XML documents usually for sending them

TỪ KHÓA LIÊN QUAN