如果使用javascript声明php [英] if statement php using javascript

查看:62
本文介绍了如果使用javascript声明php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下3行代码,该代码在执行时将在语句后清除页面,因此将页面切成两半,因为此代码位于页面中间.

 <  脚本   类型  ="  > 
                < ;? 如果(isset($ class))文档 .getElementById( '  $ class').value ==(print $ class); ?>
                    <  / 脚本 >  



有人知道为什么吗?

解决方案

class))文档 .getElementById(


class').value ==(print


class); ?> < / 脚本 >



有人知道为什么吗?


i have the following 3 lines of code which when executed, the page is being cleared after the statement, so the page is being cut in half, as this code is in the middle of the page.

<script type="text/javascript">
                <? if (isset($class)) document.getElementById('$class').value == ( print $class); ?>
                    </script>



anyone knows why?

解决方案

class)) document.getElementById('


class').value == ( print


class); ?> </script>



anyone knows why?


这篇关于如果使用javascript声明php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆