HTML, JAVASCRIPT, DOM, PHP...

Facebook Twitter

Bienvenue sur PHP Débutant. Nous allons voir dans ce tutorial comment proposer plusieurs langues sur un site grâce à PHP.

Bienvenue sur PHP Débutant

Vous allez voir ce n'est vraiment pas sorcier, il suffit de connaître le principe qui est assez proche du multi-couleurs. Nous allons utiliser un concept assez simple pour avoir plusieurs langues avec une seule page ! (Etonnant, n'est-ce pas ?) Pour cela il faut remplacer le texte par des variables, si vous ne comprenez pas trop pour l'instant, ne vous inquiétez pas, vous allez vite comprendre avec la suite du cours.

Nous aurons besoin de plusieurs fichiers : Un fichier contenant les constantes pour chaque langue. Un cookie qui garde en mémoire la langue choisie par le visiteur pour la prochaine visite. Utilisation et définition de constantes. Utilisation et création de cookies. Les fichiers langues Nous allons tout d'abord créer les fichiers contenant les variables pour chaque langue. Par convention, une constante est toujours notée en majuscules (cf doc ). <? // index.php // page1.php // Fin. Consultez les manuels de PHP, MySQL et HTML avec Ma.

HTML, JAVASCRIPT, DOM, PHP... Event properties. Page last changed today See section 7E and 7F of the book.

Event properties

The target/srcElement properties are sometimes buggy in Explorer 5 on Mac and unreliable in Netscape 4. On this page I give some example scripts for reading out event properties. There are very serious browser incompatibilities in this area. As soon as we want to read out information about the event, we’re inundated by an immense amount of properties, most of which do not work in most browsers. I am not going to give an alphabetical list of properties, since it wouldn’t help a bit to make you understand all this — the situation is too confusing. What is the type of the event? I answered the last question in great detail in a now outdated Evolt article. Please note that in these scripts I’ve been very strict in my object detection.

What is the type of the event? This is the only question with a true cross-browser answer: use the type property to read out the type: function doSomething(e) { if (! W3C/Netscape says: the target. Javascript Tips - Event Key Codes. Javascript events are used to capture user keystrokes.

Javascript Tips - Event Key Codes

Below is a table of key codes for the keys on a multimedia keyboard. If this table is inconsistent with your own findings, please let me know. This knowledge came in handy when developing the Text Counter widget, demonstrated in the Javascript widgets section. NEW: Want to double check on your local environment? Use the Online Key Code Test feature below. Key Code Reference Table Instant Key Code Test. W3C DOM Compatibility - CSS. Page last changed today This compatibility table details support for the W3C DOM CSS Level 2 modules and assorted Microsoft extensions in all modern browsers.

W3C DOM Compatibility - CSS

Want these Tables updated? Join the donation drive. This page contains five tables. The first three are quite important, the last two aren't. First the ways of accessing styles of individual HTML elements.How to access whole style sheets.How to change style sheets.Some properties of style sheets and style rules.Finally some less important miscellaneous methods. Element styles Basic style manipulation starts with accessing styles of individual HTML elements. Accessing style sheets You can access and change entire style sheets. Changing style sheets You can change entire style sheets, which means that the styles you change will apply to the whole HTML page, not just one element.

Style sheet properties Style sheets and their rules have several properties. Miscellaneous.