How to solve the StringTemplate conflict with jQuery

Source: Internet
Author: User

The field is a field for user input. The field involves user input, which must be a control. Because of the previous experience in converting project word templates to online display input (not only is word converted to html, but also word bookmarks need to be extracted as key fields and keyword segments as user input, according to the user configuration to convert to text box, drop-down box, number, currency box, time and other extensible controls ). In this template design, I no longer consider server controls, because server controls generate a lot of html tags that are difficult to control. So I went crazy about it, and implemented it in full html + jQuery (jQuery validator is used for verification ). The process design will be summarized later.

Today, we only record that the last record of the user needs to be restored on the field modification interface of the control user settings. Because all my records are html + jQuery, we provide two solutions in the Framework Design: 1: based on the page object registration page initialization script, the control value is refilled. 2: Use StringTemplate to generate html output with backfilling value.

Is the use of the second solution, the StringTemplate for jQuery $ error parsing: the solution is summarized as follows:

Triggered by jQuery, you can use jQuery () instead of $ ().
StringTemplate, which can escape jQuery $: \ $.
I am sorry for the small amount of content and a lot of nonsense.

Related Article

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.