Script on HTML (onMouseOver and onMouseOut)
The following code is using in HTML to make an action when you move mouse over a text and take the pointer out of such text.
———————————————————————
<body>
<p onMouseOver=”this.style.color=’RED’;this.style.textDecoration=’underline’;this.style.fontSize=’22’;
this.style.fontWeight=’bold’; this.style.fontStyle=’italic'” onMouseOut=”this.style.color=’Black’;this.style.textDecoration=’none’;this.style.fontSize=’16’;
this.style.fontWeight=’normal’;this.style.fontStyle=’normal'” >Hello</p>
</body>
————————————————————————-
Instruction:
– onMouseOver : this command is generated when you point your mouse pointer over the text.
– onMouseOut : this command is generated when you move your mouse pointer out of the text.
-<p> : stand for paragraph where you can compose your text.
– this : referred to the current tage which it locates in, exp : <p>
– this.style.color : set color to the text.
– this.style.textDecoration: set underline or none to the text ( in this case).
– this.style.fontWeight: set bold or normal to the text ( in this case).
– this.style.fontStyle: set italic or normal to the text (in this case).
– this.style.fontSize: set the size to current text.
by [Broskomjel] – if you have any questions over this dont be hesitate to contact me. Please contact me by mail. Visit About page to see my contact info.
Hello
I like to use this way instead of CSS .
It would be a plus ( 6 stars ) if you can expalin in khmer.
Thanks
អូ ខេ
ដោយសារពេលដាក់អត្ថបទហ្នឹង គឹកុំព្យូទ័រខ្ញុំមានបញ្ហាមិនអាចវាយអត្ថបទជាភាសាជាតិខ្មែរ យើងបាន៕ ពេលដាក់ Script លើកក្រោយខ្ញុំនឹងសរសេរជាភាសាខ្មែរ៕ អរគុណដែលបានពេញចិត្តនិង Script នេះ និងអោយផ្កាយ5 ។ 🙂