Home  >  Article  >  Web Front-end  >  The solution to the conflict between StringTemplate and jQuery_jquery

The solution to the conflict between StringTemplate and jQuery_jquery

WBOY
WBOYOriginal
2016-05-16 18:01:531551browse

A field is a field for user input, and a field must be a control when it is related to user input. Due to the experience of converting word templates into online display input from previous projects (here is not only converting word into html, but also extracting word bookmarks as key fields. The key fields are used as user input and converted into text boxes according to user configuration. Drop-down box, number, currency box, time, etc. expandable controls). I no longer consider server controls in this template design, because server controls will generate a lot of uncontrollable html tags. So I went completely crazy and implemented it using complete html jQuery (the verification also uses jQuery validator). The design of the process will be summarized slowly in the follow-up.

Today I just record that the user’s last record needs to be restored in the field modification interface of the control user settings interface. Because mine is all html jQuery, two solutions are provided in the framework design: 1: According to the page object Registration page initialization script, backfill control value. 2: Use StringTemplate to generate html output with backfill values.

is the use of the second solution. StringTemplate's incorrect analysis of jQuery$ occurred: the solution is summarized as follows:

Triggered from jQuery, you can use jQuery() instead of $().
StringTemplate This can make jQuery's $escape: $.
There is very little content and a lot of nonsense. Please forgive me.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn