我回应了一个变量,它添加了我的链接(输出一个数字)并将它们加起来。由于它是PHP,它首先加载,并使我的网站等待,直到完成加载。这可以写在jQuery?我对JavaScript很陌生。php转换为javascript
<?php
$a = file_get_contents('http://modmyi.com/cstats/index.php?package=com.modmyi.batterytheme&output=number');
$a = str_replace(",", "", $a);
$b = file_get_contents('http://modmyi.com/cstats/index.php?package=com.modmyi.connectiontheme&output=number');
$b = str_replace(",", "", $b);
$c = file_get_contents('http://modmyi.com/cstats/index.php?package=com.modmyi.icontheme&output=number');
$c = str_replace(",", "", $c);
$d = file_get_contents('http://modmyi.com/cstats/index.php?package=com.modmyi.percenttheme&output=number');
$d = str_replace(",", "", $d);
$e = file_get_contents('http://modmyi.com/cstats/index.php?package=com.modmyi.statusnotifiertheme&output=number');
$e = str_replace(",", "", $e);
$f = file_get_contents('http://modmyi.com/cstats/index.php?package=com.modmyi.cnote&output=number');
$f = str_replace(",", "", $f);
$g = file_get_contents('http://modmyi.com/cstats/index.php?package=com.modmyi.iaccescnotekb&output=number');
$g = str_replace(",", "", $g);
$h = file_get_contents('http://modmyi.com/cstats/index.php?package=com.modmyi.cnotelite&output=number');
$h = str_replace(",", "", $h);
$i = (301); //From c-note and Multi Lock Screen Theme on Rock Your Phone
$j = file_get_contents('http://modmyi.com/cstats/index.php?package=com.modmyi.multibrowsericon&output=number');
$j = str_replace(",", "", $j);
$k = file_get_contents('http://modmyi.com/cstats/index.php?package=com.modmyi.changeappstoreiconwithinstallous&output=number');
$k = str_replace(",", "", $j);
$z = $a+$b+$c+$d+$e+$f+$g+$h+$i+$j+$k;
$z = number_format($z);
echo $z;
?>
可你这是什么一样多一点我不知道我是否理解 – 2010-12-17 05:21:05
@ cnotethegr8扩大:什么TTP://modmyi.com/cstats/index.php包= com.modmyi.cnotelite&输出=多少?正在返回HTML JavaScript? – RageZ 2010-12-17 05:21:26
是的,你可以用AJAX完成同样的事情。不过,我对jQuery ajax工具并不是非常熟悉,所以我会将具体信息留给其他人。 – 2010-12-17 05:24:46