Web. py outputs the dollar sign in the template, web. py USD

Source: Internet
Author: User

Web. py outputs the dollar sign in the template, web. py USD

Because web. py has defined the "$" symbol in the template, special processing is required if you want to use the dollar symbol in the template.

If you want to output the "$ name" string in the template:
Copy codeThe Code is as follows:
$ Name

Error

$ Name is regarded as a variable rather than an HTML string. To output the "$ name" string, you must write it like this:
Copy codeThe Code is as follows:
$ Name

Save and run the correct output.
Especially when using jQuery in combination, pay attention to it. For example:
Copy codeThe Code is as follows: $ ("id" ).html (" ");
To modify it:
Copy codeThe Code is as follows: $ ("id" ).html (" ");
In this way.
Because Python is a server-side language, while JS is a client-side language. The server language finally implements the following:
Copy codeThe Code is as follows:
$ ("Id" ).html (" ");

Translated:
Copy codeThe Code is as follows:
$ ("Id" ).html (" ");

Instead of jQuery, you can use the dollar symbol $ ("id.


Template used by webpy

The template language of web. py is called Templetor, which can pass the powerful functions of python to the template system.

In the reapter control, how can I remove or replace the list symbol in the Itemtemplate with an image?

I think it's your css control, or it shows you before the <li> tag by default. Check if the code repeater you have parsed is resolved to the li tag. If yes, Add li. {
List-style-type: none;
}
Try

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.