I m试图学习杂草的移动,我很想知道,能否像我建造一个固定的网站那样,用PHP使用支流移动吗?
with jquery mobile tags are almost the same, but they use tags such as data-role,
索引t.html
<div data-role="header">
<div data-role="content">
content page
</div>
</div>
我能做这样的事情。
指数.html
<div data-role="header">
<div data-role="content">
<?php echo $content; //this content will be populated by mysql
?>
</div>
</div>
或者,我是否必须利用麻风气来获取内容?
指数.html
$(document).ready(function(){
$.ajax({
url: "测试.html",
success: function(data){
$( .page1 ).html(data);
}
});
});
<div data-role="header">
<div data-role="content" class= page1 >
<?php echo $content; //this content will be populated by mysql
?>
</div>
</div>
测试.html
<?php
$sql = mysql_query("SELECT * FROM test");
while($q = mysql_fetch_array($sql)){
$content = $q[ content ];
echo $content;
}
?>