能否把javascript中的变量传给php?而且不要刷新页面!!! 可以用AJAX实现啊,什么是AJAX,可以百度搜搜既然是新手,我想这里的一些函数对你有所帮助。http://www.xmcase.com/phplib.php 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Ajax确实能够处理!弱弱的问下:不用Ajax有没有办法实现??? .....PHP代码只是在加载的时候动态生成呀 完了就是HTML了 哪里还会有东西 可以的,JS 变量交给FLASH,FLASH 通过SOCKET 发消给PHP, <script language="javascript">var xmlHttp;function CreateXMLHttpRequest(){ if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } else { xmlHttp = new XMLHttpRequest(); }}CreateXMLHttpRequest(); if(xmlHttp) { xmlHttp.open('POST','*.php',true); //传递的php页面 var SendData = 'dstPage='+dstPage; //传递的参数值 xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); xmlHttp.send(SendData); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) { if(xmlHttp.status == 200) { var content = xmlHttp.responseText; document.getElementById('right').innerHTML = content; } } } }</script> function meth(){CreateXMLHttpRequest(); if(xmlHttp) { xmlHttp.open('POST','*.php',true); //传递的php页面 var SendData = 'dstPage='+dstPage; //传递的参数值 xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); xmlHttp.send(SendData); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) { if(xmlHttp.status == 200) { var content = xmlHttp.responseText; document.getElementById('right').innerHTML = content; } } } } 如果这样可以的话,AJAX就不会有立足之地了.. 这段代码一直有错误。麻烦高手帮我看下。已经研究了一下午了。谢谢 mysql中关于utf-8与GB2312的问题! 请问,关于PHP读XML数据 祝贺CSDN的个位GG MM中秋快乐!送分200!来者都有! 问一个PHP自定义取数字长短的问题 [简单的问题]可以使用正则表达式返回关键字符在查询字符串中的位子吗? 怎么让PHP的Session跟ASP的Session混合使用? 急!!(菜鸟的问题) [共享]谢谢大家的帮助,我终于做好了网络记事本v1.0,欢迎大家使用 input 之间怎么传递数据是在同一页面 我今天见鬼了 PHP从数据库里读取的数据问题
PHP代码只是在加载的时候动态生成呀 完了就是HTML了 哪里还会有东西
var xmlHttp;
function CreateXMLHttpRequest()
{
if (window.ActiveXObject)
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
xmlHttp = new XMLHttpRequest();
}
}CreateXMLHttpRequest();
if(xmlHttp)
{
xmlHttp.open('POST','*.php',true); //传递的php页面
var SendData = 'dstPage='+dstPage; //传递的参数值
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlHttp.send(SendData);
xmlHttp.onreadystatechange = function()
{
if(xmlHttp.readyState == 4)
{
if(xmlHttp.status == 200)
{
var content = xmlHttp.responseText;
document.getElementById('right').innerHTML = content;
}
}
}
}
</script>
{
CreateXMLHttpRequest();
if(xmlHttp)
{
xmlHttp.open('POST','*.php',true); //传递的php页面
var SendData = 'dstPage='+dstPage; //传递的参数值
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlHttp.send(SendData);
xmlHttp.onreadystatechange = function()
{
if(xmlHttp.readyState == 4)
{
if(xmlHttp.status == 200)
{
var content = xmlHttp.responseText;
document.getElementById('right').innerHTML = content;
}
}
}
}