本文整理汇总了PHP中Data::state方法的典型用法代码示例。如果您正苦于以下问题:PHP Data::state方法的具体用法?PHP Data::state怎么用?PHP Data::state使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Data
的用法示例。
在下文中一共展示了Data::state方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
?>
<!DOCTYPE html>
<html>
<head>
<title><?php
echo $data->title();
?>
</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link type="text/css" href="styles.css" rel="stylesheet">
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="jquery.address-1.5.min.js"></script>
<script type="text/javascript">
$.address.state('<?php
echo $data->state();
?>
').init(function() {
// Initializes the plugin
$('.nav a').address();
}).change(function(event) {
// Selects the proper navigation link
$('.nav a').each(function() {
if ($(this).attr('href') == ($.address.state() + event.path)) {
$(this).addClass('selected').focus();
} else {
$(this).removeClass('selected');
}
示例2: trim
}
return trim($str);
}
}
$data = new Data('data.xml');
?>
<!DOCTYPE html>
<html>
<head>
<title><?php echo($data->title()); ?></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link type="text/css" href="styles.css" rel="stylesheet">
<script type="text/javascript" src="jquery-1.5.min.js"></script>
<script type="text/javascript" src="jquery.address-1.3.2.min.js?state=<?php echo($data->state()); ?>"></script>
<script type="text/javascript">
$.address.init(function() {
// Initializes the plugin
$('.nav a').address();
}).change(function(event) {
// Selects the proper navigation link
$('.nav a').each(function() {
if ($(this).attr('href') == ($.address.state() + event.path)) {
$(this).addClass('selected').focus();
} else {
$(this).removeClass('selected');
示例3: Data
}
$data = new Data('data.xml');
?>
<!DOCTYPE html>
<html>
<head>
<title><?php echo($data->title()); ?></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link type="text/css" href="styles.css" rel="stylesheet">
<script type="text/javascript" src="jquery-1.5.2.min.js"></script>
<script type="text/javascript" src="jquery.address-1.4.1.min.js"></script>
<script type="text/javascript">
$.address.state('<?php echo($data->state()); ?>').init(function() {
// Initializes the plugin
$('.nav a').address();
}).change(function(event) {
// Selects the proper navigation link
$('.nav a').each(function() {
if ($(this).attr('href') == ($.address.state() + event.path)) {
$(this).addClass('selected').focus();
} else {
$(this).removeClass('selected');
}
});