Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by duncanb7
at 2024-04-14 02:15:56
Point:500 Replies:7 POST_ID:828471USER_ID:11059
Topic:
JavaScript;;Hypertext Markup Language (HTML)
At the beginning of my javascript code, i used insertRow and insertcells to form a table with 350*12 cells,
the speed is really slow in IE7, so from suggestion of other EE thread, I change my code to the method
suggest for string.push and string.join method in last test example at
http://www.quirksmode.org/dom/innerhtml.html. It improve a lot, and the display is came out really faster in
IE same as in FIrefox, Safari, Chrome.
My question is
1- What is clonenode method meaning in the first two example in the http link above. Why
people is using clonenode if string.push method is good or better
2- WHat is string.join('') meaning , what is meaning.
3- In Jquery, they aslo use clone() function, is it same method in first two example at the link
4- Last, I really hard to understand what is innerHTML vs DOM method , i though inner HTML is in DOM method
What is different ?
5- How to make the fastest a table nowsday, what method is the best ?
Please advise
the speed is really slow in IE7, so from suggestion of other EE thread, I change my code to the method
suggest for string.push and string.join method in last test example at
http://www.quirksmode.org/dom/innerhtml.html. It improve a lot, and the display is came out really faster in
IE same as in FIrefox, Safari, Chrome.
My question is
1- What is clonenode method meaning in the first two example in the http link above. Why
people is using clonenode if string.push method is good or better
2- WHat is string.join('') meaning , what is meaning.
3- In Jquery, they aslo use clone() function, is it same method in first two example at the link
4- Last, I really hard to understand what is innerHTML vs DOM method , i though inner HTML is in DOM method
What is different ?
5- How to make the fastest a table nowsday, what method is the best ?
Please advise
Author: duncanb7 replied at 2024-04-20 07:49:34
Thanks for your reply
Assisted Solution
Expert: legland_s replied at 2024-04-14 03:32:25
167 points EXCELLENT
jQuery.extend({
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
var clone = elem.cloneNode(true),
srcElements,
destElements,
i;
it use cloneNode
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
var clone = elem.cloneNode(true),
srcElements,
destElements,
i;
it use cloneNode
Expert: legland_s replied at 2024-04-14 03:30:00
yep
Author: duncanb7 replied at 2024-04-14 03:29:32
Question-3 , at least know it, In Jquery, they aslo use clone() function, is it same method in first two example at the link
Any special for Jquery of clone, I thought it is update finction to make a table ?
Any special for Jquery of clone, I thought it is update finction to make a table ?
Author: duncanb7 replied at 2024-04-14 03:28:21
In other words, forget about the new word to me of clonenode.
Focus on innerhtml in last tow example , which is innerHTML and innerHTML with string.push
to make a fast tabel RIght ?
Focus on innerhtml in last tow example , which is innerHTML and innerHTML with string.push
to make a fast tabel RIght ?
Assisted Solution
Expert: legland_s replied at 2024-04-14 03:16:17
166 points EXCELLENT
Accepted Solution
Expert: legland_s replied at 2024-04-14 03:12:44
167 points EXCELLENT
1- What is clonenode method meaning in the first two example in the http link above. Why
people is using clonenode if string.push method is good or better
DOM manipulation is safer way to do, but very slow. Others solutions are shortcuts
2- WHat is string.join('') meaning , what is meaning.
It join tables elements together in 1 string using empty string between
3- In Jquery, they aslo use clone() function, is it same method in first two example at the link
4- Last, I really hard to understand what is innerHTML vs DOM method , i though inner HTML is in DOM method
What is different ?
innerHTML modify the DOM once, insert row modify dom each line
5- How to make the fastest a table nowsday, what method is the best ?
innerHTML is faster i think there are benchmark on the net depends data size, rows numbers etc..