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

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

WBOY
WBOYOriginal
2016-06-13 12:33:04825browse

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

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


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

现在想直接用这个值进行  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