English 中文(简体)
jquery$.post re data from php is food.
原标题:jquery $.post returned data from php is empty

i m 将该代码上载到一个网址:

var qreq = ".....myurl.php";
$.post(qreq, function(data){alert(data);});

在我的PHP档案中,有:

......
$prevtopic = $row["topic_id"];
echo $prevtopic;

警示已经发出,但只是空白。 由于某种原因,数据是空洞的,尽管有一米的对应数据来自购买力平价的档案。 i 还试图仅仅重复“hi”,但那就没有工作了。 什么是错了?

感谢。

最佳回答

您不能像这样提出交叉要求,而封杀你们的是

您可为此使用JSONP,但不能像你那样获得正常的html/文本内容。 下面是一份简短的书面陈述,其中应更好地介绍关于JSONP,但。 你们需要从PHP返回JSONP。

关于why? http://evil.com/http://mybank.com,说明为何政策存在。

问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签