In the smarty template, js modifies the value of the form, as it directly uses this form value in the template for if statement judgment

Source: Internet
Author: User
In the smarty template, js modifies the form value. if this form value is directly used in the template for if statement judgment? Code: & lt; script & nbsp; language = "javascript" & gt; function & nbsp; handlerTao (tao, yitaocan, huafei) {& nbsp; in the & nbsp smarty template, js modifies the form value. if this form value is directly used in the template for the if statement judgment?
Code:



function handlerTao(tao,yitaocan,huafei){
            $("#taocan").val(tao);
$("#taocanid").val(huafei);
}
《script》  




Now the form value with id taocanid has been dynamically added to jquery.

Now we want to use this value for the if statement judgment. What should I do? Shared to: function? HandlerTao (tao, yitaocan, huafei ){???????????? $... 'Data-pics = ''>
------ Solution --------------------
I don't know what you want to say. The template is parsed on the server side and js is operated locally. Is there any relationship between the two?
------ Solution --------------------
Where do you want to judge the if statement ??

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.