$ (Document). ready (function (){
$ ("<Div>" pai.data('rownum', 92.16.css ('Margin ', '10px ')
. AppendTo (document. body)
. Bind ('rows ', function (){
$ (This ). parent (). find ("div: lt (" + ($ (this ). data ('rownum') + ")"). eq (0)
. Css ('Margin ', 10 + $ (this). data ('rownum') * 2 + 'px ')
. Css ('Opacity ', '0. 1'). animate ({opacity: '0. 99'}, 200, function (){
$ (This). before ($ (this). clone (true). data ('rownum', $ (this). data ('rownum')-1 ))
. Unbind ('rows ')
. Append (
$ ("<P>"). data ('columnnum', $ (this). data ('rownum'). width (20). height (20)
. Css ('display', 'inline ')
. AppendTo ($ (this ))
. Bind ('columns ', function (){
$ (This). text ($ (this). data ('columnnum') +
"X" +
($ (This). parent (). data ('rownum') +
"=" +
($ (This). data ('columnnum') * ($ (this). parent (). data ('rownum '))
).Css ('color ',
'Rgb ('+ $ (this). data ('columnnum') * $ (this). data ('columnnum') * 3 + ','
+ ($ (This). parent (). data ('rownum') + $ (this). data ('columnnum') * 10 + ','
+ $ (This). parent (). data ('rownum') * $ (this). parent (). data ('rownum') * 2 + ')')
. Css ('margin-left ',
$ (This). data ('columnnum') * $ (this). parent (). data ('rownum') + 'px ')
. Parent (). find ("p: lt (" + ($ (this). data ('columnnum')-1) + ")"). eq (0)
. Css ('Opacity ', '0. 1 ')
. Animate ({opacity: '1. 00 '},
$ (This). data ('columnnum') * $ (this). parent (). data ('rownum') * 40,
Function (){
$ (This). before ($ (this). clone (true). data ('columnnum', $ (this). data ('columnnum')-1 ))
. Unbind ('columns ')
. Parent (). find ("p"). eq (0). triggerHandler ('columns ')
})
}). TriggerHandler ('columns ')
). Parent (). find ("div"). eq (0). triggerHandler ('rows ')
})
}). TriggerHandler ('rows ');
});
The above is a code program written by jquery for the 9-9 multiplication table. Below
Var table = "<table>"
For (var I = 1; I <= 9; I ++ ){
Table + = "<tr> ";
For (var j = 1; j <= 9; j ++ ){
Var data = (j <= I? "" + I + "*" + j + "=" + I * j :"");
Table + = "<td>" + data + "</td> ";
}
Table + = "</tr> ";
}
Table + = "</table> ";
$ ("Body"). append (table );
Below is a simple writing