我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

当变量包含数据时执行ajax

I have a session variable email=$_GET['email']; , i want to execute a ajax function when this varaible is available and do no action when the variable is not available.

How to call a ajax function when the variable is available?

You can use:

<?php if(isset($_GET['email']) && $_GET['email'] !='') {?>
    <script>
        // your ajax function comes here
    </script>
<?php } ?> 

you can you Php code under javascript.

var emial = ''; $.ajax({ // your ajax code });

近期文章

  • 这两个中的哪一个在PHP中有更好的性能,为什么?
  • 我可以使用Pusher将多少用户连接到我的Laravel应用程序? [关闭]
  • 在中科大镜像源里下载的ubuntu下载好变成了DVD怎么回事?
  • configured clock speed是不是影响内存的工作频率?
  • VClient连接vcenter服务器出现错误
  • 爆炸功能对我不起作用?
  • 在php中从多个多维数组创建一个数组
  • RegEx - 两者之间的数字。 和/ /
  • 如何使用Laravel中的insert插入数据库中避免重复输入?
  • 将时间转换为UTC
  • XSS Works,但只有1个字
  • 如何根据标题准确比较在线产品?
  • 如何在PHP中调试语法错误:T_CONSTANT_ENCAPSED_STRING? [重复]
  • 通过php代码启动浏览器[关闭]
  • 没有错误...我试过没有结果
  • php中的换行无法正常工作[重复]
  • 在回声中执行回声
  • 如何根据日期将unix时间戳正确转换为BST或GMT?
  • 在mysql PDO中插入数据的错误[重复]
  • PHP:如何使用str_replace

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华