Actualizaciones de la tabla grande utilizando AJAX en Internet Explorer 11 (Continuamente) -- javascript campo con jquery campo con html campo con ajax campo con dom camp codereview Relacionados El problema

Large table updates using AJAX in Internet Explorer 11 (Cont'd)


1
vote

problema

Español

Tema anterior: > Actualizaciones de la tabla grande usando AJAX en Internet Explorer 11

Para las funciones incluidas aquí, he tomado el consejo de la respuesta anterior e incorporada en la reestructuración, pero todavía estoy experimentando enorme latencia de aproximadamente 2 segundos por registro de computadora .

Tengo lugar a que crea que esto es más un problema con la estructura del DOM. He añadido el HTML a esta publicación. ¿Alguien podría aconsejar si puede haber un método de estructura / acceso de tabla más apropiada que pueda adaptarse mejor a mis necesidades?

  function writeTableLines(tempRows){     /* This Function takes care of updating the text and coloring of     network name     Boot time     chck in time     workgroup     utilization     All other values are not dynamically written.     */     for( i in tempRows){         var tempValues = tempRows[i];         // For Row         var selector = $(document.getElementById(i.toString()));         var name_selector = selector.find(".name");         var network_selector = $(document.getElementById(i.toString()+'_network'));  //"[id='"+i+"_network']";         var boot_selector =  $(document.getElementById(i.toString()+'_boot'));                //"[id='"+i+"_boot']";         var check_in_selector =   $(document.getElementById(i.toString()+'_checked_in'));//"[id='"+i+"_checked_in']";         var util_selector = selector.find('.util').find('a');         var workgroup_selector = selector.find('.workgroup').find('a');    network_selector.text(tempValues['network']);    if (tempValues['network_color']){       network_selector.addClass(tempValues['network_color']);       name_selector.addClass(tempValues['network_color']);   }else{       network_selector.removeClass('warning');        name_selector.removeClass('warning');   }          // Boot Time    boot_selector.text(tempValues['boot']);   if (tempValues['boot_color']){       boot_selector.addClass(tempValues['boot_color']);      name_selector.addClass(tempValues['boot_color'])   }else{       boot_selector.removeClass('issue');       name_selector.removeClass('issue');   }    // Last Checked In Timestamp    check_in_selector.text(tempValues['checked_in']);   if (tempValues['service_unresponsive']){       check_in_selector.addClass('redline');       name_selector.addClass('redline');   }else{       check_in_selector.removeClass('redline');       name_selector.removeClass('redline');   }     util_selector.text(tempValues['util'])    if (tempValues['util_class']){             util_selector.addClass(tempValues['util_class']);         }else{             util_selector.removeClass('redline warning');         }            if (($.trim(tempValues['workgroup'])) != $.trim(workgroup_selector.text())){             if ((tempValues['workgroup'] != selected) && (selected != 'All')){        workgroup_selector.addClass('warning');       }else{        workgroup_selector.removeClass('warning');       }   }         workgroup_selector.text(tempValues['workgroup'])   toggle_links(i, tempRows[i]);   $('#connectionGrid').trigger('updateAll', [false]);    } } function disable_links(computer){  var links = document.getElementsByClassName("pclinks_"+computer);  var myLength = links.length;  for(var i = 0; i < myLength ;i++){   links[i].removeAttribute("href");   $(links[i]).addClass('disabled_link').removeClass('enabled_link');   if (links[i].id == 'refresh'){    continue;   }   links[i].onclick = function(){    alert("Currently Offline");   }     } }  function enable_links(computer, network){  var links = document.getElementsByClassName("pclinks_"+computer);  var myLength = links.length;  for(var i = 0 ; i < myLength ; i++){    if (links[i].id == 'refresh'){     links[i].onclick = function(){ refresh(this)};     continue;    }    links[i].href = "file://///"+network+"/MM"+links[i].id;    $(links[i]).removeClass('disabled_link').addClass('enabled_link');       $(links[i]).prop("onclick", null);   } }   function toggle_links(computer, row){  if(row['online'] == false){   disable_links(computer);  }else{   enable_links(computer, row['network']);  } }  
  {% extends 'directory/base.html' %}  {% block content %}  <div id="tabs">     <ul id="gaugeList">         {% for workgroup in context['workgroup_list'] %}         <li><h3>         <a class="gaugeCell" id="{{ workgroup.shorthand }}" href="#tabs-{{ workgroup.shorthand }}"></a>         </h3></li>         {% endfor %}     </ul>     <div id="gridBox" class="scrollable">         <table id="connectionGrid" class="tablesorter">             <thead>                 <tr>                     <th>Type</th>                     <th>Computer</th>                     <th>Workgroup</th>                     <th>C: Drive %</th>                     <th></th>                     <th></th>                     <th></th>                     <th class="clearall button" onclick="hideRows()">Clear All</th>                     <th onclick="collapseListener()" id="collapserows" class="collapseall button">Collapse All</th>                 </tr>             </thead>             <tbody id="connectionBody">                 {% for computer in context['computer_list'] %}                  {% if (computer.visible == True or current_user.is_admin) and computer.active_drive is not none %}                 <tr id="{{computer.name}}" class="parent">                     <td rowspan="1" class="type">                         <a href="#" class="toggle">{{ computer.station_type if computer.station_type else 'Enter Data'}}</a>                     </td>                     <td class="name">                         <a href="#" id="name" class="toggle">{{computer.name}}</a>                     </td>                     <td class="workgroup">                         <a href="#" id="{{computer.name}}_workgroup" class="innerworkgroup toggle">{{computer.active_drive.workgroup.shorthand}}</a>                     </td>                     <td class="util">                         <a href="#" class="toggle" id="{{computer.name}}_util">{{ computer.active_drive.percentage_full if computer.active_drive.percentage_full else 'Check Service'}}</a>                     </td>                     <td>                         <a id="{{computer.name}}_Users" class="enabled_link pclinks_{{computer.name}}" href="file://///{{ computer.active_drive.name }}/MMUsers" target="_blank">Users</a>                     </td>                     <td>                         <a id="{{computer.name}}_Projects" class="enabled_link pclinks_{{computer.name}}" href="file://///{{ computer.active_drive.name }}/MMProjects" target="_blank">Projects</a>                     </td>                     <td>                         <a id="{{computer.name}}_attic" class="enabled_link pclinks_{{computer.name}}" href="file://///{{ computer.active_drive.name}}/MMAttic" target="_blank">Attic</a>                     </td>                     <td>                         <a id="{{computer.name}}_pcusers" class="enabled_link pclinks_{{computer.name}}" href="file://///{{ computer.active_drive.name }}/MMPCUsers" target="_blank">Desktops</a>                     </td>                     <td>                         <img src="{{url_for('static',filename='images/refresh.png')}}" title="Service restart may take up to a minute" id="{{computer.name}}_refresh" class="pclinks_{{computer.name}}" onclick="refresh(this)" target="_blank">                         </img>                     </td>                     <tr class="tablesorter-childRow">                         <td class="label dualboot topitem" colspan="1">Dual Boot</td>                         <td class="info dualboot topitem" colspan="1" >                             {{ 'Yes' if computer.dual_boot == True else 'No' }}                         </td>                          <td class="label topitem" colspan="3" style="text-align:center;">{{computer.active_drive.image_version}}</td>                          <td class="label topitem" colspan="2">Media Composer</td>                         <td class="info topitem" colspan="2">{{computer.active_drive.media_composer_version}}</td>                     </tr>                     <tr class="tablesorter-childRow">                         <td class="label" colspan="1">Network Name</td>                         <td class="info" colspan="1" id="{{computer.name}}_network">{{ computer.active_drive.name }}</td>                          <td class="label">Model</td>                         <td class="info" colspan="2">                             {{ computer.model if computer.model else 'Check Service' }}</td>                         <td class="label" colspan="2">Interplay Access</td>                         <td class="info" colspan="2">{{computer.active_drive.access_version}}</td>                     </tr>                     <tr class="tablesorter-childRow">                         <td class="label">Room</td>                         <td class="info" colspan="1">                             {% if computer.room %} {{ computer.room }} ({{computer.room.description}}) {% else %} Enter Data {% endif %}                         </td>                          <td class="label" colspan="1">Edit Service</td>                         <td class="info" colspan="2">{{computer.active_drive.edit_service_version}}</td>                         <td class="label" colspan="2">Media Indexer</td>                         <td class="info " colspan="2">{{computer.active_drive.indexer_version}}</td>                     </tr>                     <tr class="tablesorter-childRow">                         <td class="label" colspan="1">Phone</td>                         <td class="info" colspan="1">                             {{ computer.room.phone_numbers if computer.room.phone_numbers else 'Enter Data'}}</td>                          <td class="label ">Boot Time</td>                         <td class="info " colspan="2" id="{{computer.name}}_boot">                             {% if computer.online == false %} Offline {% else %} {{ computer.active_drive.boot_time if computer.active_drive.boot_time else 'Check Service' }} {% endif %}                         </td>                          <td class="label" colspan="2">Transfer Client</td>                         <td class="info" colspan="2">{{computer.active_drive.transfer_client_version}}</td>                     </tr>                     <tr class="tablesorter-childRow">                         <td class="label" id="intercomlabel" colspan="1">Intercom</td>                         <td class="info" colspan="1">                             {{ computer.room.intercom_numbers if computer.room.intercom_numbers else 'Enter Data' }}                         </td>                         <td class="label" colspan="1">Checked-In</td>                         <td class="info checkin" colspan="2" id="{{computer.name}}_checked_in">                             {{ computer.active_drive.last_checked_in if computer.active_drive.last_checked_in else 'Check Service' }}                         </td>                         <td class="label" colspan="2">Avid ISIS Client</td>                         <td class="info" colspan="2">{{computer.active_drive.isis_client_version}}</td>                     </tr>                     <tr class="tablesorter-childRow">                         <td class="label">Notes</td>                         <td class="info" colspan="1">{{ computer.notes if computer.notes else ''}}</td>                         <td class="label">Swing Date</td>                          <td class="info" colspan="2">{{ computer.active_drive.last_changed_workgroup }}</td>                          <td class="label" colspan="2">Nvidia Driver</td>                         <td class="info " colspan="2">{{computer.active_drive.graphics_driver_version}}</td>                    </tr>                  {% endif %}                  {% endfor %}             </tbody>         </table>      </div>      <div id="bottom" class="bottom">         {% for workgroup in context['workgroup_list'] %}         <a href="#" id="{{workgroup.shorthand}}" class="show_{{workgroup}}"> {{ workgroup.shorthand }} </a> {% endfor %}     </div> </div> {% endblock %}  
Original en ingles

Previous topic: Large table updates using AJAX in Internet Explorer 11

For the functions included here, I have taken the advice of the previous answer and incorporated it in the restructure, but am still experiencing huge latency of about 2 seconds per computer record.

I am lead to believe that this is more an issue with the structure of the DOM. I have added the HTML to this post. Could anyone advise if there may be a more appropriate table structure / access method that might better suit my needs?

function writeTableLines(tempRows){     /* This Function takes care of updating the text and coloring of     network name     Boot time     chck in time     workgroup     utilization     All other values are not dynamically written.     */     for( i in tempRows){         var tempValues = tempRows[i];         // For Row         var selector = $(document.getElementById(i.toString()));         var name_selector = selector.find(".name");         var network_selector = $(document.getElementById(i.toString()+'_network'));  //"[id='"+i+"_network']";         var boot_selector =  $(document.getElementById(i.toString()+'_boot'));                //"[id='"+i+"_boot']";         var check_in_selector =   $(document.getElementById(i.toString()+'_checked_in'));//"[id='"+i+"_checked_in']";         var util_selector = selector.find('.util').find('a');         var workgroup_selector = selector.find('.workgroup').find('a');    network_selector.text(tempValues['network']);    if (tempValues['network_color']){       network_selector.addClass(tempValues['network_color']);       name_selector.addClass(tempValues['network_color']);   }else{       network_selector.removeClass('warning');        name_selector.removeClass('warning');   }          // Boot Time    boot_selector.text(tempValues['boot']);   if (tempValues['boot_color']){       boot_selector.addClass(tempValues['boot_color']);      name_selector.addClass(tempValues['boot_color'])   }else{       boot_selector.removeClass('issue');       name_selector.removeClass('issue');   }    // Last Checked In Timestamp    check_in_selector.text(tempValues['checked_in']);   if (tempValues['service_unresponsive']){       check_in_selector.addClass('redline');       name_selector.addClass('redline');   }else{       check_in_selector.removeClass('redline');       name_selector.removeClass('redline');   }     util_selector.text(tempValues['util'])    if (tempValues['util_class']){             util_selector.addClass(tempValues['util_class']);         }else{             util_selector.removeClass('redline warning');         }            if (($.trim(tempValues['workgroup'])) != $.trim(workgroup_selector.text())){             if ((tempValues['workgroup'] != selected) && (selected != 'All')){        workgroup_selector.addClass('warning');       }else{        workgroup_selector.removeClass('warning');       }   }         workgroup_selector.text(tempValues['workgroup'])   toggle_links(i, tempRows[i]);   $('#connectionGrid').trigger('updateAll', [false]);    } } function disable_links(computer){  var links = document.getElementsByClassName("pclinks_"+computer);  var myLength = links.length;  for(var i = 0; i < myLength ;i++){   links[i].removeAttribute("href");   $(links[i]).addClass('disabled_link').removeClass('enabled_link');   if (links[i].id == 'refresh'){    continue;   }   links[i].onclick = function(){    alert("Currently Offline");   }     } }  function enable_links(computer, network){  var links = document.getElementsByClassName("pclinks_"+computer);  var myLength = links.length;  for(var i = 0 ; i < myLength ; i++){    if (links[i].id == 'refresh'){     links[i].onclick = function(){ refresh(this)};     continue;    }    links[i].href = "file://///"+network+"/MM"+links[i].id;    $(links[i]).removeClass('disabled_link').addClass('enabled_link');       $(links[i]).prop("onclick", null);   } }   function toggle_links(computer, row){  if(row['online'] == false){   disable_links(computer);  }else{   enable_links(computer, row['network']);  } }
{% extends 'directory/base.html' %}  {% block content %}  <div id="tabs">     <ul id="gaugeList">         {% for workgroup in context['workgroup_list'] %}         <li><h3>         <a class="gaugeCell" id="{{ workgroup.shorthand }}" href="#tabs-{{ workgroup.shorthand }}"></a>         </h3></li>         {% endfor %}     </ul>     <div id="gridBox" class="scrollable">         <table id="connectionGrid" class="tablesorter">             <thead>                 <tr>                     <th>Type</th>                     <th>Computer</th>                     <th>Workgroup</th>                     <th>C:\ Drive %</th>                     <th></th>                     <th></th>                     <th></th>                     <th class="clearall button" onclick="hideRows()">Clear All</th>                     <th onclick="collapseListener()" id="collapserows" class="collapseall button">Collapse All</th>                 </tr>             </thead>             <tbody id="connectionBody">                 {% for computer in context['computer_list'] %}                  {% if (computer.visible == True or current_user.is_admin) and computer.active_drive is not none %}                 <tr id="{{computer.name}}" class="parent">                     <td rowspan="1" class="type">                         <a href="#" class="toggle">{{ computer.station_type if computer.station_type else 'Enter Data'}}</a>                     </td>                     <td class="name">                         <a href="#" id="name" class="toggle">{{computer.name}}</a>                     </td>                     <td class="workgroup">                         <a href="#" id="{{computer.name}}_workgroup" class="innerworkgroup toggle">{{computer.active_drive.workgroup.shorthand}}</a>                     </td>                     <td class="util">                         <a href="#" class="toggle" id="{{computer.name}}_util">{{ computer.active_drive.percentage_full if computer.active_drive.percentage_full else 'Check Service'}}</a>                     </td>                     <td>                         <a id="{{computer.name}}_Users" class="enabled_link pclinks_{{computer.name}}" href="file://///{{ computer.active_drive.name }}/MMUsers" target="_blank">Users</a>                     </td>                     <td>                         <a id="{{computer.name}}_Projects" class="enabled_link pclinks_{{computer.name}}" href="file://///{{ computer.active_drive.name }}/MMProjects" target="_blank">Projects</a>                     </td>                     <td>                         <a id="{{computer.name}}_attic" class="enabled_link pclinks_{{computer.name}}" href="file://///{{ computer.active_drive.name}}/MMAttic" target="_blank">Attic</a>                     </td>                     <td>                         <a id="{{computer.name}}_pcusers" class="enabled_link pclinks_{{computer.name}}" href="file://///{{ computer.active_drive.name }}/MMPCUsers" target="_blank">Desktops</a>                     </td>                     <td>                         <img src="{{url_for('static',filename='images/refresh.png')}}" title="Service restart may take up to a minute" id="{{computer.name}}_refresh" class="pclinks_{{computer.name}}" onclick="refresh(this)" target="_blank">                         </img>                     </td>                     <tr class="tablesorter-childRow">                         <td class="label dualboot topitem" colspan="1">Dual Boot</td>                         <td class="info dualboot topitem" colspan="1" >                             {{ 'Yes' if computer.dual_boot == True else 'No' }}                         </td>                          <td class="label topitem" colspan="3" style="text-align:center;">{{computer.active_drive.image_version}}</td>                          <td class="label topitem" colspan="2">Media Composer</td>                         <td class="info topitem" colspan="2">{{computer.active_drive.media_composer_version}}</td>                     </tr>                     <tr class="tablesorter-childRow">                         <td class="label" colspan="1">Network Name</td>                         <td class="info" colspan="1" id="{{computer.name}}_network">{{ computer.active_drive.name }}</td>                          <td class="label">Model</td>                         <td class="info" colspan="2">                             {{ computer.model if computer.model else 'Check Service' }}</td>                         <td class="label" colspan="2">Interplay Access</td>                         <td class="info" colspan="2">{{computer.active_drive.access_version}}</td>                     </tr>                     <tr class="tablesorter-childRow">                         <td class="label">Room</td>                         <td class="info" colspan="1">                             {% if computer.room %} {{ computer.room }} ({{computer.room.description}}) {% else %} Enter Data {% endif %}                         </td>                          <td class="label" colspan="1">Edit Service</td>                         <td class="info" colspan="2">{{computer.active_drive.edit_service_version}}</td>                         <td class="label" colspan="2">Media Indexer</td>                         <td class="info " colspan="2">{{computer.active_drive.indexer_version}}</td>                     </tr>                     <tr class="tablesorter-childRow">                         <td class="label" colspan="1">Phone</td>                         <td class="info" colspan="1">                             {{ computer.room.phone_numbers if computer.room.phone_numbers else 'Enter Data'}}</td>                          <td class="label ">Boot Time</td>                         <td class="info " colspan="2" id="{{computer.name}}_boot">                             {% if computer.online == false %} Offline {% else %} {{ computer.active_drive.boot_time if computer.active_drive.boot_time else 'Check Service' }} {% endif %}                         </td>                          <td class="label" colspan="2">Transfer Client</td>                         <td class="info" colspan="2">{{computer.active_drive.transfer_client_version}}</td>                     </tr>                     <tr class="tablesorter-childRow">                         <td class="label" id="intercomlabel" colspan="1">Intercom</td>                         <td class="info" colspan="1">                             {{ computer.room.intercom_numbers if computer.room.intercom_numbers else 'Enter Data' }}                         </td>                         <td class="label" colspan="1">Checked-In</td>                         <td class="info checkin" colspan="2" id="{{computer.name}}_checked_in">                             {{ computer.active_drive.last_checked_in if computer.active_drive.last_checked_in else 'Check Service' }}                         </td>                         <td class="label" colspan="2">Avid ISIS Client</td>                         <td class="info" colspan="2">{{computer.active_drive.isis_client_version}}</td>                     </tr>                     <tr class="tablesorter-childRow">                         <td class="label">Notes</td>                         <td class="info" colspan="1">{{ computer.notes if computer.notes else ''}}</td>                         <td class="label">Swing Date</td>                          <td class="info" colspan="2">{{ computer.active_drive.last_changed_workgroup }}</td>                          <td class="label" colspan="2">Nvidia Driver</td>                         <td class="info " colspan="2">{{computer.active_drive.graphics_driver_version}}</td>                    </tr>                  {% endif %}                  {% endfor %}             </tbody>         </table>      </div>      <div id="bottom" class="bottom">         {% for workgroup in context['workgroup_list'] %}         <a href="#" id="{{workgroup.shorthand}}" class="show_{{workgroup}}"> {{ workgroup.shorthand }} </a> {% endfor %}     </div> </div> {% endblock %}
              

Lista de respuestas

1
 
vote

Sé que ha sido bastante tiempo desde que se publicó la pregunta y quizás haya encontrado optimizaciones ya pero, con suerte, la revisión a continuación será útil.

Selección de elementos

En la revisión anterior, la respuesta de @ roamer-1888 declaró lo siguiente:

Buscando un todo, gran DOM para elementos es un verdadero asesino de rendimiento. Cuando sea posible, siempre intente buscar un fragmento, o atravesar el DOM en relación con un elemento conocido.

Sin embargo, parece que la función 9988776655544330 tiene muchas llamadas a document.getElementById() . Por ejemplo, selector se puede encontrar utilizando el elemento <tbody> . Sería mejor almacenar una referencia a ese elemento fuera del for bucle -

  var tbody = $('#connectionBody');   

luego selector se puede encontrar usando selector.find() < / a>:

  var selector = tbody.find('#' + i.toString());   

Una vez selector , los otros elementos secundarios (por ejemplo, document.getElementById()0 , 99887766555443311 , etc.) se puede encontrar usando document.getElementById()2 también ...

Único document.getElementById()3 Atributos

Dentro de las funciones document.getElementById()4 y document.getElementById()5 Veo la lógica condicional como esta:

  document.getElementById()6  

Pero mirando el html no veo ningún elemento con ese atributo id . Dentro de cada fila veo un elemento con

  document.getElementById()7  

A menos que haya otro elemento HTML que no se incluyó en la publicación original, ese código condicional mencionado anteriormente nunca evaluaría a document.getElementById()8 .

De manera similar, noté en el HTML para las filas de tabla:

  document.getElementById()9  

Esto significa que cada fila tiene un elemento de anclaje con el valor de atributo ID selector0 . Recuerde que " el atributo global id define un identificador único (ID) que debe ser único en todo el documento . " 1

1 https://developer.mozilla.org/en-us/docs/web/html/global_attributes/id

 

I know it has been quite some time since the question was posted and maybe you have found optimizations already but hopefully the review below will be helpful.

Selecting elements

In the previous review, the answer by @Roamer-1888 stated the following:

Searching a whole, large DOM for elements is a real performance killer. When possible, always try to search a fragment, or traverse the DOM relative to a known element.

Yet, it appears that the writeTableLines() function still has many calls to document.getElementById(). For example, selector could be found by utilizing the <tbody> element. It would be best to store a reference to that element outside the for loop -

var tbody = $('#connectionBody'); 

Then selector can be found using selector.find():

var selector = tbody.find('#' + i.toString()); 

Once selector has been found, the other child elements (e.g network_selector, boot_selector, etc.) can be found using selector.find() as well...

Unique id attributes

Inside the functions disable_links() and enable_links() I see conditional logic like this:

if (links[i].id == 'refresh'){ 

But looking at the HTML I don't see any element with that id attribute. Inside each row I see an element with

<img src="{{url_for('static',filename='images/refresh.png')}}" title="Service restart may take up to a minute" id="{{computer.name}}_refresh" class="pclinks_{{computer.name}}" onclick="refresh(this)" target="_blank"> 

So unless there is another HTML element that wasn't included in the original post, that conditional code mentioned above would never evaluate to true.

Similarly, I noticed in the HTML for the table rows:

<td class="name">       <a href="#" id="name" class="toggle">{{computer.name}}</a> 

This means that each row has an anchor element with the id attribute value name. Remember that "The id global attribute defines a unique identifier (ID) which must be unique in the whole document."1

1https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id

 
 

Relacionados problema

3  Aplicación de anulación dom  ( Dom override app ) 
Estoy construyendo una mini aplicación que se mostrará cuando JavaScript ha realizado los cambios en el DOM. Tengo todas las funciones que puedo pensar en la ...

4  Función de marcador de posición de búsqueda personalizada de Google en JavaScript  ( Google custom search placeholder function in javascript ) 
Problema: Tenemos una función de búsqueda personalizada de Google que reemplaza el atributo 99887776665544335 y funciona bien. ¿Serías tan amables y ayu...

4  Función para mostrar una alerta  ( Function to display an alert ) 
Es un script de alerta de usuario. Funcionó en cada navegador que probé. Pero la función en sí se ve muy desordenada / repetitiva. ¿Hay alguna manera de hacer...

7  Elementos de anidación con apendchild  ( Nesting elements with appendchild ) 
Quiero hacer un navegación que se vea así: <nav class="socialmediaicons"> <ul> <li> <a> <img> </a> </li> </ul> </nav> ...

2  Validación instantánea de la longitud del campo de la forma  ( Instantaneous validation of form field length ) 
Dado que tengo una función que se puede hacer de unas maneras como de costumbre, me preguntaba qué sigue es el mejor para lograr la validación del formulario ...

1  ¿Puedo ajustar este código que muestra una tabla para ejecutar más rápido?  ( Can i adjust this code which displays a table to run faster ) 
this.displayData = function () { var i; var $thead = $(thead); var $tbody = $(tbody); var numberOfFields = columnDataFields.length; var n...

5  Anexar múltiples niños a un nodo a la vez  ( Append multiple children to a node at once ) 
Este, mi intento de respuesta para una pregunta sobre So: Anexar múltiples artículos en JavaScript < / a> Me gustaría saber si he cometido errores en cuant...

2  ¿Cómo hacer un pequeño cálculo en una caída cuando se hace clic?  ( How to do a small calculation on a drop down when clicked ) 
Tengo un formulario que requiere un cálculo cuando se hace clic en un selector desplegable múltiple, y aún muestra los clics de los cursos en tiempo real y, p...

1  Construyendo árbol de DOM de XML, comprobando / actualizando el puntaje promedio del jugador  ( Building dom tree from xml checking updating players average score ) 
Esta es la primera vez que analizo un archivo XML. Así que estaré agradecido por cualquier sugerencia sobre cómo se puede mejorar mi código. O si pudiera suge...

3  Código de JavaScript para agregar botones y elimíntelos lentamente  ( Javascript code to add buttons and slowly remove them ) 
El código de mi javascript está funcionando, sin embargo, estoy buscando sugerencias sobre cómo puedo mejorar mi código existente para la reutilización y la c...




© 2022 respuesta.top Reservados todos los derechos. Centro de preguntas y respuestas reservados todos los derechos