« Home « Chủ đề lập trình website

Chủ đề : lập trình website


Có 20+ tài liệu thuộc chủ đề "lập trình website"

Tài liệu đào tạo ASP.NET

tailieu.vn

ASP.NET. V.7 Explanation of the code. V.9 Explanation of the Code. <textarea>...</textarea>. <select>...</select>. <span>...</span>. <div>...</div>. a reloading of the same page on form submission. However, that portion of the script enclosed within the If Not Page.IsPostBack condition is run only the first time the page is loaded, not when responding to a user event to reload the page, say when...

Giáo trình: ASP.NET nâng cao

tailieu.vn

4.4 S d ng đi u khi n TreeView ử ụ ề ể. Ch ươ ng 5: Xây d ng và s d ng các Đi u khi n do ng ự ử ụ ề ể ườ i dùng t o ra ạ 5.1 T ng quan v xây d ng các đi u khi n ổ ề ụ ề...

Practical prototype and scipt.aculo.us part 1

tailieu.vn

Prototype’s Philosophy. Using Enumerable#each. Using Enumerable#detect. Using Enumerable#select. Using Enumerable#reject. Using Enumerable#partition. Using Enumerable#min and #max. Using Enumerable#sortBy. Using Enumerable#map and Enumerable#inject. Using Enumerable#pluck and Enumerable#invoke. Using Enumerable in Your Own Collections

Practical prototype and scipt.aculo.us part 2

tailieu.vn

script.aculo.us ■ CHAPTER 9 What You Should Know About DHTML and script.aculo.us. Introducing script.aculo.us. The script.aculo.us Web Site. Contributing to script.aculo.us. Getting Started with script.aculo.us. Loading script.aculo.us on a Page. CHAPTER 10 Introduction to script.aculo.us Effects. script.aculo.us Effects

Practical prototype and scipt.aculo.us part 3

tailieu.vn

After getting hooked on the Web in 1996 and spending several years pushing pixels and bits for the likes of IBM and Konica Minolta, AARON GUSTAFSON founded his own web consultancy: Easy! Designs. Aaron is a member of the Web Standards Project (WaSP) and the Guild of Accessible Web Designers (GAWDS). He also serves as a technical edi- tor for...

Practical prototype and scipt.aculo.us part 4

tailieu.vn

['foo', 'bar'] instanceof Object. instanceof Object. new Date instanceof Object;. false new String instanceof Object. 5 instanceof Object. false new Number(5) instanceof Object. true instanceof Object. false new Boolean(true) instanceof Object. Although JavaScript is most certainly object oriented, it’s likely not the sort of object ori- entation you’re used to. Array instanceof Object. true new Array instanceof Object. This behavior...

Practical prototype and scipt.aculo.us part 5

tailieu.vn

Self-documenting code: In the README file of Prototype 1.0, Sam Stephenson states,. But readability, intuitive naming schemes, and cleanliness are still virtues of Prototype’s source code.. Prototype’s Purpose and Scope. Prototype’s Web Site. You can get Prototype, learn more about it, and read current project news at Prototype’s web site, at www.prototypejs.org. You’ll also learn where to go if you...

Practical prototype and scipt.aculo.us part 6

tailieu.vn

You’ll get tired of typing out. document.getElementById , so you’ll write an alias. Then you’ll notice that Internet Explorer and Firefox have different event systems, so you’ll write a wrapper function for adding events. Then you’ll become irritated with a specific oversight of the language itself, so you’ll use JavaScript’s extensibility to write some code to correct it.. Then one...

Practical prototype and scipt.aculo.us part 7

tailieu.vn

Object.extend(data,. Object.extend also solves our typing woes when extending built-ins:. Object.extend(String.prototype. for (var i in String.prototype) console.log(i);. WHY NOT USE OBJECT.PROTOTYPE.EXTEND?. If we were steadfastly abiding by JavaScript’s object orientation, we’d define Object.prototype.. data.extend({. The structure of a CSS file consists of selectors, each with a certain number of rules (i.e., “The elements that match this selector should have these...

Practical prototype and scipt.aculo.us part 8

tailieu.vn

The length property and the ubiquitous for looping construct result in a simple, low- tech way to loop over an array’s values: start at 0 and count up to the value of length. threeStooges.length. element.style.color = "red";. The each method we just wrote will loop over an array’s indices and call iterator on each, passing into it the current item...

Practical prototype and scipt.aculo.us part 9

tailieu.vn

Using Enumerable#select. Using Enumerable#reject. Using Enumerable#partition. Using Enumerable#min and #max. words.max( function(word. return word.length. 16 words.min( function(word. Comparing on string length, we get 3 and 16 as the min and max, respectively—the lengths of the shortest and longest words in the array.. Using Enumerable#sortBy. words.sortBy( function(word. return word.match(/[aeiou]/g).length. var totalLength = words.inject(0, function(memo, string. Since we need to keep track...

Practical prototype and scipt.aculo.us part 10

tailieu.vn

The Object.prototype Problem. In theory, we can define properties on Object.prototype and have them propagate to every instance of Object . Unfortunately, when properties are enumerated in a for...in loop, anything that’s been defined on Object.prototype will get picked up.. Object.prototype.each = function(iterator. obj.each(console.log. That way we can define instance methods on its prototype with- out encroaching on Object.prototype ....

Practical prototype and scipt.aculo.us part 11

tailieu.vn

Notice that we’re incrementing two at a time, skipping all the odd values of i . Remember how Object.extend works—we’re taking each property on Enumerable and copying it onto EvenArray.prototype. And we’re done. we’re now able to use any Enumerable method on instances of EvenArray. And because they’re abstract, they’re mercifully free of the annoying cross-browser issues that cast their...

Practical prototype and scipt.aculo.us part 12

tailieu.vn

new Ajax.Request('ajax.js. True to its name, onComplete is called as the very last thing Ajax.Request does before it punches its timecard. We can request any kind of file with Ajax—not just JavaScript files. To prove it, rename ajax.js to ajax.txt and try this (see Figure 4-5):. new Ajax.Request('ajax.txt. That’s how we were able to display the contents of ajax.txt in...

Practical prototype and scipt.aculo.us part 13

tailieu.vn

Ajax.PeriodicalUpdater. It works like it sounds: give it a URL, an element to update, and a time interval, and it will run an Ajax.Updater at that interval for the life of the page—or until you tell it to stop.. Let’s try it. Reload index.html and run this command in the console:. new Ajax.PeriodicalUpdater('bucket', 'ajax.html. Now they’re reproducing with no help...

Practical prototype and scipt.aculo.us part 14

tailieu.vn

Near the bottom of your console should be a gray box containing the URL of the request. So let’s change our Ajax call so that new entries are appended to the top of the container:. Run this code and you’ll see your new entry added to the top of the list, as in Figure 4-13. If it doesn’t find them,...

Practical prototype and scipt.aculo.us part 15

tailieu.vn

We’re almost there. Victory! As Figure 4-18 shows, bad requests show up bright red in the error log.. Example 2: Fantasy Football. It’s time to talk about the site we’ll be building together over the course of this book.. JavaScript has a place on many different kinds of sites, but web applications are espe- cially ripe for applying the topics...

Practical prototype and scipt.aculo.us part 16

tailieu.vn

that’s the job of the server.. We’ll be using PHP, but the basic idea is the same for any language. We’ll have stats running on a 10-minute cycle, after which every score will reset.. We’ll tell each class how to report its own score based on the current time and the pace of scoring we’ve set.. We’ll write as little...