如何循环这个? [英] how to loop through this?

查看:72
本文介绍了如何循环这个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿所有人,


我想要做的是显示以前输入的信息。我知道我需要一个循环,但我不知道如何循环这个基于我的表格出现在javascript中


这里是我的代码

Hey Everyone,

What i am trying to do is show previously entered information. I know i need a loop for this , but i am not sure how to loop through this based on my form appears all in the javascript

here is my code

展开 | 选择 | Wrap | 行号

推荐答案

而不是使用JavaScript来显示onload信息,而是直接在dynamicInput中的HTML中使用Coldfusion。 div使用循环(cfoutput或cfloop)循环查询。将JavaScript innerHTML语句转换为普通的HTML代码。
Rather than using JavaScript to show the information onload, use Coldfusion directly in the HTML inside the "dynamicInput" div using a loop (cfoutput or cfloop) to loop over the query. Convert the JavaScript innerHTML statements into normal HTML code.



而不是使用JavaScript来显示onload信息,直接在HTML里面使用Coldfusion dynamicInput div使用循环(cfoutput或cfloop)循环查询。将JavaScript innerHTML语句转换为普通的HTML代码。
Rather than using JavaScript to show the information onload, use Coldfusion directly in the HTML inside the "dynamicInput" div using a loop (cfoutput or cfloop) to loop over the query. Convert the JavaScript innerHTML statements into normal HTML code.



Hey Acoder,


好​​的,让我确保我理解正确。所以请把所有表格信息都拿到里面javascript将其复制并将其转换为HTML,并将其放入我的< div id =" dynamicInput">然后将cfloop应用于它。然后在javscript部分转换它只是HTML?我想在开始之前确保理解。


谢谢,

Rach

Hey Acoder,

Ok so let me make sure i understand you correctly.So take all the form information inside the javascript copy it and turn it into just HTML an put it in my <div id="dynamicInput"> an then apply the cfloop to it. Then in the javscript part turn it in just HTML? Just want to make sure i understand before i go ahead.

Thank you,
Rach


差不多。这里不需要任何JavaScript,因为无论如何你都称它为onload。将所有JavaScript转换为Coldfusion,以便在页面加载时显示表格/表格,而不是之后。转换JavaScript并不困难。获取所有表格和表单代码并将其直接放在div中。 cfloop将用于每张票,因此不会重复。
Almost. There''s no need for any JavaScript here because you''re calling it onload anyway. Convert all the JavaScript into Coldfusion instead so that the table/form appears whilst the page is loading and not after. To convert the JavaScript is not difficult. Take all the table and form code and put it directly in the div. The cfloop would be for each ticket, so there would be no repetition.


这篇关于如何循环这个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆