zf-Adding an ordinal question about <td/> tags in <ww:iterator/> tags

Source: Internet
Author: User

The first code is like this <ww:if> tag I added, but after the addition of the problem.

Because I added a judgment statement, so that the unnecessary information is not shown, resulting in #li.count this method of showing the subscript is not feasible

Then I use JS to write this:

And then out of the page is this:

The reason is: ID can only have one, if it is written in the loop then there is n ID, so 86 before the ID, are overwritten, this is displayed in the 86.

Although not realized, but still learned something, is to pay attention to is: here JS to write under TD, or can not be based on the ID to take TD points, will be null.

Later contacts help me remote, I just realized, originally can also engage in this way:

Just a document.write (); It solves the problem perfectly. I didn't even think of it!

The characters are stitched directly into the write stream, and then the code is output. Write I Baidu a bit, he is directly on the basis of the page to write code, is very convenient, but after writing to Document.close (), put it off, or the following code may be wrong.

document.write ();

If you want to replace the current page with script-generated HTML, you must concatenate the HTML content to a variable and use a document.write () method to complete the write operation. You do not have to clear the document and open a new data stream, and a document.write () call will do all of the work.

Two younger brother in method: can also write this, also can:

zf-Adding an ordinal question about <td/> tags in <ww:iterator/> tags

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.