JQUERY $.post 方法
来源:互联网 发布:花与剑js mp3百度云 编辑:程序博客网 时间:2024/06/08 06:23
<script type="text/javascript" src="lib/jquery.js"></script><script language="javascript">$(function(){ $('#submit2').click(function(){ $.post('go.php',{pk:$('#pk').val()},function(data){ var a=data; if(a=='1'){ document.getElementById('tijiao').disabled=false; document.getElementById("pk_result").style.display="block"; $("#sp").html('<embed src="vcastr.swf?" wmode="Opaque" FlashVars="vcastr_file=sp/01.flv&vcastr_config=1:自动播放|1:连续播放|0:默认音量|0:控制栏位置|3:控制栏显示|0xff6600:主体颜色|60:主体透明度|0xffcc00:光晕颜色|0xffffff:图标颜色|0xff0000:文字颜色|Ruochi.com:logo文字|:logo地址|:结束swf地址" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="288" height="174"></embed></object>'); }else if(a=='2'){ document.getElementById('tijiao').disabled=false; document.getElementById("pk_result").style.display="block"; $("#sp").html('<embed src="vcastr.swf?" wmode="Opaque" FlashVars="vcastr_file=sp/02.flv&vcastr_config=1:自动播放|1:连续播放|0:默认音量|0:控制栏位置|3:控制栏显示|0xff6600:主体颜色|60:主体透明度|0xffcc00:光晕颜色|0xffffff:图标颜色|0xff0000:文字颜色|Ruochi.com:logo文字|:logo地址|:结束swf地址" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="288" height="174"></embed></object>'); }else{ document.getElementById("c1").style.display="block"; document.getElementById('tijiao').disabled=true; $("#sp").html('<img src="images/pk_chaoxishou_video.png"/>'); } }) })})</script>
控制这个图层是否显示
<div class="pk_chaoxishou_ym" id=c1 style="display: none">
<img src="images/ym.png" />
<!--幽默-->
</div>
PHP接收文件
$pk = $_POST['pk'];$id = 1;$infosql = "select * from `bst_hist` where id='" . $id . "'";$queryinfo = mysql_query($infosql, $conn);$rshist = mysql_fetch_array($queryinfo);if ($pk == 'aa'){echo "1";$cs = $rshist['hist'] + 1;$sqlcs = "update `bst_hist` set hist=$cs where id='" . $id . "'";mysql_query($sqlcs, $conn);}elseif($pk == 'bb'){echo "2";$cs = $rshist['hist'] + 1;$sqlcs = "update `bst_hist` set hist=$cs where id='" . $id . "'";mysql_query($sqlcs, $conn);}else{echo "0";}?>
- jquery的Post方法$.post()
- jQuery ajax --post() 方法
- jQuery.post() 方法用法
- JQUERY $.post 方法
- jquery post方法
- jquery post方法使用
- jQuery ajax - post() 方法
- jQuery ajax - post() 方法
- JQuery AJAX $.post()方法
- jQuery ajax - post() 方法
- jQuery ajax - post() 方法
- jQuery ajax - post() 方法
- jQuery $.post() 方法
- jQuery.post方法
- jquery-ajax-$post方法
- jQuery post() 方法
- jquery 中的$.post()方法实例
- jquery.post方法动态参数
- 利用CURL实现抓取外域内容
- “Invalid layout of preloaded class”问题解决
- 开始学习汇编语言
- H.264中普通I帧和IDR帧究竟有什么区别?(不要与MPEG2中的I帧搞混淆了)
- 英语练习128 I quit smoking
- JQUERY $.post 方法
- SQL Server2005权限系统
- DB2 db2top 性能监控 命令用法 找出最频繁、最耗时的SQL
- message的6种类型
- 王爽《汇编语言》第6章 包含多个段的程序
- shell编译问题
- LeetCode Flatten Binary Tree to Linked List
- jQuery 搜索关键字自动匹配提示插件
- Xcode4中将app上传到itunesconnect的步骤