Home >Backend Development >PHP Tutorial >smarty 模版中,js修改了表单的值,如果直接在模版中用该表单值进行if语句判断?

smarty 模版中,js修改了表单的值,如果直接在模版中用该表单值进行if语句判断?

WBOY
WBOYOriginal
2016-06-23 14:26:12905browse

代码:

<script language="javascript">function handlerTao(tao,yitaocan,huafei){            $("#taocan").val(tao);		$("#taocanid").val(huafei);					}</script>  <input type="text" name="taocanid" value="" id="taocanid">


现在id为taocanid的表单值已经为jquery动态添加。  

现在想直接用这个值进行  if 语句判断。该怎么操作?


回复讨论(解决方案)

不知道你想说什么。 模板是在服务器端解析的, js是在本地操作的, 两者有关系么?

你想在哪进行if语句判断??

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