【发布时间】:2011-03-25 10:52:17
【问题描述】:
您好!我听说过各种捕获和返回文本的方法。例如正则表达式。我对 PHP 有点陌生,但我想知道如何使用 PHP 从这个 JavaScript 代码中捕获和返回文本。我只对捕获 msgBody、msgTitle 和 insertDate 感兴趣。感谢您查看我的问题
function wibiyaNotifierLoad() {
if (typeof(jQuery.cookie) == 'function') {
loadjscssfile("Graphics_Toolbar/Notifier/notifier_2.css?v2", "css", "head");
var data = {
"count": 1,
"notifications": [{
"Id": "264727",
"toolbarId": "602582",
"msgId": "9",
"msgTitle": "Its that time of year!",
"msgBody": "check you email for updates!",
"msgLink": "",
"msgImage": "",
"filter": "",
"startDate": "2011-03-22 23:00:00",
"expirationDate": "2011-03-23 00:00:00",
"active": "1",
"insertDate": "2011-03-22 23:12:31"
}],
"ok": true
};
【问题讨论】:
-
“捕获”到底是什么意思?在什么情况下?您是在准备 Ajax 调用,还是在解析源文件?
标签: php javascript parsing