order meeting room - 离散度30min
w
<meta charset="UTF-8">
<?php
include('conn.php');
include('w_fun.php');
include('config_lang.php');
include('w_fun_this_project.php');
$sql = 'SET GLOBAL connect_timeout=31536000';
mysqli_query($link, $sql);
$wclock0 = 8;
$wclock1 = 21; $wtoday = date('Y-m-d');
$wts = strtotime($wtoday);
$wts += $wclock0 * 3600;
echo $wts . '<br>'; $sql = 'SELECT ro.*,FROM_UNIXTIME(ro.wstart,"%Y%m%d") AS wdate,FROM_UNIXTIME(ro.wstart,"%H%i") AS wshi, FROM_UNIXTIME(ro.wend,"%H%i") AS wehi FROM room_order ro WHERE wstart>' . $wts . ' ORDER BY wstart ASC'; $sql = 'SELECT ro.*,FROM_UNIXTIME(ro.wstart,"%Y%m%d") AS wdate,FROM_UNIXTIME(ro.wstart,"%H%i") AS wshi, FROM_UNIXTIME(ro.wend,"%H%i") AS wehi FROM room_order ro ORDER BY wstart ASC'; $wts = strtotime($wtoday);
$wts += $wclock1 * 3600;
echo $wts . '<br>'; $wrows = db_multiple_rows_link($link, $sql); $w = 0;
$wb = 0;
$wtmpdate = '';
$wdate_arr = array();
foreach ($wrows AS $one) {
if ($wb == 0) {
$wdate_arr[$w][] = $one;
$wb = 1;
} else {
if ($wtmpdate == $one['wdate']) {
$wdate_arr[$w][] = $one;
} else {
$w++;
$wdate_arr[$w][] = $one;
}
}
$wtmpdate = $one['wdate'];
} $wdate_easy = array();
$w = 0;
foreach ($wdate_arr AS $one) {
$wdate_easy[$w]['wdate'] = $one['0']['wdate']; for ($wi = $wclock0; $wi < $wclock1; $wi++) {
$wii = 100 * $wi;
$wdate_easy[$w][$wii . 's'] = '';
$wdate_easy[$w][$wii . 'e'] = '';
$wii = 100 * $wi + 30;
$wdate_easy[$w][$wii . 's'] = '';
$wdate_easy[$w][$wii . 'e'] = '';
} $w++;
} $w = 0;
foreach ($wdate_arr AS $one) { foreach ($one AS $oneb) {
$wshi = $oneb['wshi'];
$wehi = $oneb['wehi'];
$wcon = $oneb['sysuser'];
$wcon = $wshi . '-' . $wehi . $oneb['sysuser'] . '-id' . $oneb['id']; for ($wi = $wclock0; $wi < $wclock1; $wi++) { $wii = 100 * $wi;
if ($wshi >= $wii && $wshi < ($wii + 30)) {
$wdate_easy[$w][$wii . 's'] = $wcon;
}
if ($wehi >= $wii && $wehi < ($wii + 30)) {
$wdate_easy[$w][$wii . 'e'] = $wcon;
} $wii = 100 * $wi + 30;
if ($wshi >= $wii && $wshi < ($wii + 30)) {
$wdate_easy[$w][$wii . 's'] = $wcon;
}
if ($wehi >= $wii && $wehi < ($wii + 30)) {
$wdate_easy[$w][$wii . 'e'] = $wcon;
} }
}
$w++;
} ?>
<script>
console.log(document.cookie);
</script>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>order room - 离散度30min </title>
<link rel="stylesheet" href="static/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="static/bootstrap/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="static/base.css">
<script src="static/jquery-3.1.0.min.js"></script>
<script src="static/bootstrap/js/bootstrap.min.js"></script> <link rel="stylesheet" href="static/jquery-timepicker-master/jquery.timepicker.css">
<script src="static/jquery-timepicker-master/jquery.timepicker.min.js"></script> </head>
<body>
<?php
$wtr = '<table class="table table-striped table-bordered">
<tr><td>日期</td><td>会议室编号</td><td>会议室名称</td>';
for ($w = $wclock0; $w < $wclock1; $w++) { $wtr .= '<td>' . $w . ':00</td>';
$wtr .= '<td>' . $w . ':30</td>';
} $wtr .= '<td>' . $wclock1 . ':00</td></tr>'; foreach ($wdate_easy AS $one) {
$wtr .= '<tr><td>' . $one['wdate'] . '</td><td>会议室编号12</td><td>会议室名称124</td>'; $wcolor = 0;
$wstyle[0] = ' ';
$wstyle[1] = ' style="background-color: greenyellow" '; for ($wi = $wclock0; $wi < $wclock1; $wi++) { $wii = 100 * $wi;
if ($one[$wii . 's'] != '' || $one[$wii . 'e'] != '') {
$wcolor = 1;
}
$wid = $one['wdate'] . $wii;
$wtr .= '<td ' . $wstyle[$wcolor] . ' id="' . $wid . '" >' . '<button class="btn " data-toggle="modal" data-target="#w' . $wid . '">
' . $one[$wii . 's'] . '</button> ' . '<br><br><br>' . $one[$wii . 'e'] . '</td>';
?>
<!-- 模态框(Modal) -->
<div class="modal fade" id="<?= 'w' . $wid ?>" tabindex="-1" role="dialog" aria-labelledby="<?= 'wt' . $wid ?>"
aria-hidden="true">
<div class="modal-dialog">
<form method="post" action="">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
</button>
<h4 class="modal-title" id="<?= 'wt' . $wid ?>">
会议室预订
</h4>
</div>
<div class="modal-body"> <table class="table">
<tr>
<td>会议日期</td>
<td id="wd<?= $wid ?>"><input class="form-control" type="text" name="wd"
id="wd<?= $wid ?>" value="<?= $one['wdate'] ?>"></td>
</tr>
<tr>
<td>会议室名称</td>
<td id="wr<?= $wid ?>"><input class="form-control" type="text" name="wr"
id="wr<?= $wid ?>"
value="<?= $one['wdate'] . '45355' ?>"></td>
</tr>
<tr>
<td>会议主题</td>
<td><input class="form-control" type="text" name="wtheme" id="wt<?= $wid ?>"></td>
</tr>
<tr>
<td class="">开始时间</td>
<td><input class="form-control" id="jq_timepicker<?= $wid ?>s" type="text"
name="wts" value="<?=substr($wii,0,strlen($wii)-2).':'.substr($wii,strlen($wii)-2,2);?>">
</td>
</tr>
<tr>
<td>结束时间</td> <td><input class="form-control" id="jq_timepicker<?= $wid ?>e" type="text"
name="wte" >
</td>
</tr> <tr>
<td>预定人</td>
<td><input class="form-control" type="text" name="wu" id="wu<?= $wid ?>"
value="<?= $_COOKIE['userid'] ?>">
</tr> </table>
<script> <?$wid ?>
$('#jq_timepicker<?=$wid ?>s').timepicker({
'minTime': '8:00am',
'maxTime': '9:00pm',
'showDuration': false,
'step': 1
}); $('#jq_timepicker<?=$wid ?>e').timepicker({
'minTime': '8:00am',
'maxTime': '9:00pm',
'showDuration': false,
'step': 1
}); </script>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消
</button>
<button type="submit" class="btn btn-primary" name="wsu" id="wo<?= $wid ?>">
提交预订
</button>
</div>
</div>
</form>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div> <?php
if ($one[$wii . 's'] == '' && $one[$wii . 'e'] != '') {
$wcolor = 0;
}
if ($one[$wii . 's'] != '' && $one[$wii . 'e'] != '') {
$wcolor = 0;
} $wii = 100 * $wi + 30;
$wid = $one['wdate'] . $wii;
$wtr .= '<td ' . $wstyle[$wcolor] . ' id="' . $wid . '" >' . '<button class="btn " data-toggle="modal" data-target="#w' . $wid . '">
' . $one[$wii . 's'] . '</button> ' . '<br><br><br>' . $one[$wii . 'e'] . '</td>';
?>
<!-- 模态框(Modal) -->
<div class="modal fade" id="<?= 'w' . $wid ?>" tabindex="-1" role="dialog" aria-labelledby="<?= 'wt' . $wid ?>"
aria-hidden="true">
<div class="modal-dialog">
<form method="post" action="">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
</button>
<h4 class="modal-title" id="<?= 'wt' . $wid ?>">
会议室预订
</h4>
</div>
<div class="modal-body"> <table class="table">
<tr>
<td>会议日期</td>
<td id="wd<?= $wid ?>"><input class="form-control" type="text" name="wd"
id="wd<?= $wid ?>" value="<?= $one['wdate'] ?>"></td>
</tr>
<tr>
<td>会议室名称</td>
<td id="wr<?= $wid ?>"><input class="form-control" type="text" name="wr"
id="wr<?= $wid ?>"
value="<?= $one['wdate'] . '45355' ?>"></td>
</tr>
<tr>
<td>会议主题</td>
<td><input class="form-control" type="text" name="wtheme" id="wt<?= $wid ?>"></td>
</tr>
<tr>
<td class="">开始时间</td>
<td><input class="form-control" id="jq_timepicker<?= $wid ?>s" type="text"
name="wts" value="<?=substr($wii,0,strlen($wii)-2).':'.substr($wii,strlen($wii)-2,2);?>">
</td>
</tr>
<tr>
<td>结束时间</td> <td><input class="form-control" id="jq_timepicker<?= $wid ?>e" type="text"
name="wte">
</td>
</tr> <tr>
<td>预定人</td>
<td><input class="form-control" type="text" name="wu" id="wu<?= $wid ?>"
value="<?= $_COOKIE['userid'] ?>">
</tr> </table>
<script> $('#jq_timepicker<?=$wid ?>s').timepicker({
'minTime': '8:00am',
'maxTime': '9:00pm',
'showDuration': false,
'step': 1
}); $('#jq_timepicker<?=$wid ?>e').timepicker({
'minTime': '8:00am',
'maxTime': '9:00pm',
'showDuration': false,
'step': 1
}); </script>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消
</button>
<button type="submit" class="btn btn-primary" name="wsu" id="wo<?= $wid ?>">
提交预订
</button>
</div>
</div>
</form>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div> <?php if ($one[$wii . 's'] == '' && $one[$wii . 'e'] != '') {
$wcolor = 0;
}
}
$wtr .= '</tr>';
} $wtr .= '</table>';
echo $wtr;
?> </body>
</html>
<meta charset="UTF-8">
<?php
include('conn.php');
include('w_fun.php');
include('config_lang.php');
include('w_fun_this_project.php');
$sql = 'SET GLOBAL connect_timeout=31536000';
mysqli_query($link, $sql);
$wclock0 = 8;
$wclock1 = 21; $wtoday = date('Y-m-d');
$wts = strtotime($wtoday);
$wts += $wclock0 * 3600; $sql = 'SELECT ro.*,FROM_UNIXTIME(ro.wstart,"%Y%m%d") AS wdate,FROM_UNIXTIME(ro.wstart,"%H%i") AS wshi, FROM_UNIXTIME(ro.wend,"%H%i") AS wehi FROM room_order ro WHERE wstart>' . $wts . ' ORDER BY wstart ASC'; $sql = 'SELECT ro.*,FROM_UNIXTIME(ro.wstart,"%Y%m%d") AS wdate,FROM_UNIXTIME(ro.wstart,"%H%i") AS wshi, FROM_UNIXTIME(ro.wend,"%H%i") AS wehi FROM room_order ro ORDER BY wstart ASC'; $wts = strtotime($wtoday);
$wts += $wclock1 * 3600; $wrows = db_multiple_rows_link($link, $sql); $w = 0;
$wb = 0;
$wtmpdate = '';
$wdate_arr = array();
foreach ($wrows AS $one) {
if ($wb == 0) {
$wdate_arr[$w][] = $one;
$wb = 1;
} else {
if ($wtmpdate == $one['wdate']) {
$wdate_arr[$w][] = $one;
} else {
$w++;
$wdate_arr[$w][] = $one;
}
}
$wtmpdate = $one['wdate'];
} $wdate_easy = array();
$w = 0;
foreach ($wdate_arr AS $one) {
$wdate_easy[$w]['wdate'] = $one['0']['wdate']; for ($wi = $wclock0; $wi < $wclock1; $wi++) {
$wii = 100 * $wi;
$wdate_easy[$w][$wii . 's'] = '';
$wdate_easy[$w][$wii . 'e'] = '';
$wii = 100 * $wi + 30;
$wdate_easy[$w][$wii . 's'] = '';
$wdate_easy[$w][$wii . 'e'] = '';
} $w++;
} $w = 0;
foreach ($wdate_arr AS $one) { foreach ($one AS $oneb) {
$wshi = $oneb['wshi'];
$wehi = $oneb['wehi'];
$wcon = $oneb['sysuser'];
$wcon = $wshi . '-' . $wehi . $oneb['sysuser'] . '-id' . $oneb['id']; for ($wi = $wclock0; $wi < $wclock1; $wi++) { $wii = 100 * $wi;
if ($wshi >= $wii && $wshi < ($wii + 30)) {
$wdate_easy[$w][$wii . 's'] = $wcon;
}
if ($wehi >= $wii && $wehi < ($wii + 30)) {
$wdate_easy[$w][$wii . 'e'] = $wcon;
} $wii = 100 * $wi + 30;
if ($wshi >= $wii && $wshi < ($wii + 30)) {
$wdate_easy[$w][$wii . 's'] = $wcon;
}
if ($wehi >= $wii && $wehi < ($wii + 30)) {
$wdate_easy[$w][$wii . 'e'] = $wcon;
} }
}
$w++;
} ?>
<script>
console.log(document.cookie);
</script>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>order room - 离散度30min </title>
</head>
<body>
<?php
$wtr = '<table>
<tr><td>日期</td><td>会议室编号</td><td>会议室名称</td>';
for ($w = $wclock0; $w < $wclock1; $w++) { $wtr .= '<td>' . $w . ':00</td>';
$wtr .= '<td>' . $w . ':30</td>';
} $wtr .= '<td>' . $wclock1 . ':00</td></tr>'; foreach ($wdate_easy AS $one) {
$wtr .= '<tr><td>' . $one['wdate'] . '</td><td>会议室编号' . rand(123, 789) . '</td><td>会议室名称124</td>'; $wcolor = 0;
$wstyle[0] = ' ';
$wstyle[1] = ' style="background-color: greenyellow" '; for ($wi = $wclock0; $wi < $wclock1; $wi++) { $wii = 100 * $wi;
if ($one[$wii . 's'] != '' || $one[$wii . 'e'] != '') {
$wcolor = 1;
}
$wtr .= '<td ' . $wstyle[$wcolor] . '>' . $one[$wii . 's'] . '<br><br><br>' . $one[$wii . 'e'];
if ($one[$wii . 's'] == '' && $one[$wii . 'e'] != '') {
$wcolor = 0;
}
if ($one[$wii . 's'] != '' && $one[$wii . 'e'] != '') {
$wcolor = 0;
} $wii = 100 * $wi + 30;
$wtr .= '<td ' . $wstyle[$wcolor] . '>' . $one[$wii . 's'] . '<br><br><br>' . $one[$wii . 'e'];
if ($one[$wii . 's'] == '' && $one[$wii . 'e'] != '') {
$wcolor = 0;
} } $wtr .= '</tr>';
} $wtr .= '</table>';
echo $wtr;
?> </body>
</html>
<meta charset="UTF-8">
<?php
include('conn.php');
include('w_fun.php');
include('config_lang.php');
include('w_fun_this_project.php');
$sql = 'SET GLOBAL connect_timeout=31536000';
mysqli_query($link, $sql);
$wclock0 = 8;
$wclock1 = 21; $wtoday = date('Y-m-d');
$wts = strtotime($wtoday);
$wts += $wclock0 * 3600;
echo $wts . '<br>'; $sql = 'SELECT * FROM room_order WHERE wstart>' . $wts . ' ORDER BY wstart ASC';
var_dump($sql); $wts = strtotime($wtoday);
$wts += $wclock1 * 3600;
echo $wts . '<br>'; $wrows = db_multiple_rows_link($link, $sql); echo '<br>-------------------------------db<br>';
foreach ($wrows AS $one) {
//var_dump($one);
echo '<br>';
$date = date('Y_m_d', $one['wstart']);
$dateb = date('H:i', $one['wstart']);
$ws = intval(date('Hi', $one['wstart']));
echo '<br>' . $date;
echo '<br>' . $dateb;
echo '<br>' . $ws; $date = date('Y_m_d', $one['wend']);
$dateb = date('H:i', $one['wend']);
$we = intval(date('Hi', $one['wend']));
echo '<br>' . $date;
echo '<br>' . $dateb;
echo '<br>' . $we;
$wcount = floor(($we - $ws) / 30);
echo '<br>' . $wcount;
for ($w = $wclock0; $w < $wclock1; $w++) { $wn = 'w' . $date . 'ws' . ($w * 100);
$wv = 'w';
if ($ws >= ($w - 1) * 100 && $ws < ($w * 100 + 30)) {
$wv = $one['id'] . '@w@' . $one['sysuser'];
}
wjs_cookie($wn, $wv);
$wn = 'w' . $date . 'we' . ($w * 100);
$wv = 'w';
if ($we >= ($w - 1) * 100 && $we < ($w * 100 + 30)) {
$wv = $one['id'] . '@w@' . $one['sysuser'];
}
wjs_cookie($wn, $wv); $wn = 'w' . $date . 'ws' . ($w * 100 + 30);
$wv = 'w';
if ($ws >= ($w * 100 + 30) && $ws < ($w + 1) * 100) {
$wv = $one['id'] . '@w@' . $one['sysuser'];
}
wjs_cookie($wn, $wv);
$wn = 'w' . $date . 'we' . ($w * 100 + 30);
$wv = 'w';
if ($we >= ($w * 100 + 30) && $we < ($w + 1) * 100) {
$wv = $one['id'] . '@w@' . $one['sysuser'];
}
wjs_cookie($wn, $wv); }
} function wjs_cookie($wn, $wv)
{ echo '<script>document.cookie="' . $wn . '=' . $wv . '";</script>';
} echo '<br>-------------------------------wcookie<br>';
//var_dump($_COOKIE); $sql = 'SELECT MAX(wstart) AS wmaxdate FROM room_order ';
var_dump($sql);
$wmaxdate = db_single_row_single_field_link($link, $sql, 'wmaxdate');
$wts = strtotime($wtoday);
//$wmaxdate = date('Y_m_d', $wmaxdate );
echo '<br>' . $wmaxdate . '<br>'; $sql = 'SELECT MIN(wstart) AS wmindate FROM room_order ';
var_dump($sql);
$wmindate = db_single_row_single_field_link($link, $sql, 'wmindate');
$wts = strtotime($wtoday);
//$wmindate = date('Y_m_d', $wmindate);
//echo '<br>'.$wmindate .'<br>';
$wdays = ceil(($wmaxdate - $wmindate) / (24 * 3600));
var_dump($wdays); ?>
<script>
console.log(document.cookie);
</script>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>order room - 离散度30min </title>
<link rel="stylesheet" href="static/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="static/bootstrap/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="static/base.css">
<script src="static/jquery-3.1.0.min.js"></script>
</head>
<body>
<?php
$wtr = '<table class="table table-striped">
<tr><td>日期</td><td>会议室编号</td><td>会议室名称</td>';
for ($w = $wclock0; $w < $wclock1; $w++) { $wtr .= '<td>' . $w . ':00</td>';
$wtr .= '<td>' . $w . ':30</td>';
} $wtr .= '<td>' . $wclock1 . ':00</td></tr>'; for ($wtab = 0; $wtab < $wdays; $wtab++) {
$wtr .= '<tr><td>' . date('Y-m-d', $wrows[$wtab]['wstart']) . '</td><td>会议室编号12</td><td>会议室名称124</td>';
for ($w = $wclock0; $w < $wclock1; $w++) {
$wtr .= '<td>' . 'wwr' . ':00</td>';
}
$wtr .= '</tr>';
} $wtr .= '</table>';
echo $wtr;
?> </body>
</html>
order meeting room - 离散度30min的更多相关文章
- timeline css
CODE <!doctype html> <html> <head> <meta charset="UTF-8"> <titl ...
- timepicker php strtotime 8hours
https://jqueryui.com/datepicker/ w timepicker datepicker 日期 时间 选择器 <script src="static/jquer ...
- hdu-5521 Meeting(最短路)
题目链接: Meeting Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) ...
- HDU 5521 Meeting(虚拟节点+最短路)
Meeting Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total ...
- URAL 1085 Meeting(最短路)
Meeting Time limit: 2.0 secondMemory limit: 64 MB K friends has decided to meet in order to celebrat ...
- 3890: [Usaco2015 Jan]Meeting Time( dp )
简单的拓扑图dp.. A(i, j), B(i, j) 表示从点 i 长度为 j 的两种路径是否存在. 用bitset就行了 时间复杂度O(m) --------------------------- ...
- Codeforces 420 B. Online Meeting
B. Online Meeting time limit per test 1 second memory limit per test 256 megabytes input standard in ...
- codeforces 782B The Meeting Place Cannot Be Changed (三分)
The Meeting Place Cannot Be Changed Problem Description The main road in Bytecity is a straight line ...
- code force 403B.B. The Meeting Place Cannot Be Changed
B. The Meeting Place Cannot Be Changed time limit per test 5 seconds memory limit per test 256 megab ...
随机推荐
- 微服务实战-使用API Gateway
当你决定将应用作为一组微服务时,需要决定应用客户端如何与微服务交互.在单体式程序中,通常只有一组冗余的或者负载均衡的服务提供点.在微服务架构中,每一个微服务暴露一组细粒度的服务提供点.在本篇文章中,我 ...
- 每日英语:The Perils Of Giving Advice
I know what you should do and here's my advice. How many times have you heard that (and groaned)? gr ...
- 访问子节点childNodes
访问子节点childNodes 访问选定元素节点下的所有子节点的列表,返回的值可以看作是一个数组,他具有length属性. 语法: elementNode.childNodes 注意: 如果选定的节点 ...
- windows下wim配置成IDE
1.配置文件_wimrc set fileencodings=utf-,ucs-bom,cp936,big5 set fileencoding=utf- source $VIMRUNTIME/vimr ...
- 一款基于jquery超炫的弹出层提示消息
今天给大家带来一款基于jquery超炫的弹出层提示消息.这款实例页面初始时,一个go按钮.当单击go按钮时,提示强出层以动画形式出现.效果图如下: 在线预览 源码下载 实现的代码. html代码: ...
- Qt 中彩色图像转换为灰度图
近期在做几个图像处理相关的项目.里面有一个操作就是须要先将彩色图像转换为灰度图像. QImage 有一个convertToFormat方法.最開始一直用这个函数来实现. 可是今天细致看了看,发现这个函 ...
- HTML5 + AJAX ( jQuery版本 ) 文件上传带进度条
页面技术:HTML5 + AJAX ( jQuery) 后台技术:Servlet 3.0 服务器:Tomcat 7.0 jQuery版本:1.9.1 Servlet 3.0 代码 package or ...
- oozie中时间EL表达式
EL表达式: 常量表示形式 含义说明 ${coord:minutes(int n)} 返回日期时间:从一开始,周期执行n分钟 ${coord:hours(int n)} 返回日期时间:从一开始,周期执 ...
- 在MySQL应用上的挑战
本期采访的讲师是来自腾讯高级软件工程师 雷海林,他有着10年以上的Linux后台Server开发经验,目前主要从事分布式Cache.实时大数据处理引擎,分布式MySQL(TDSQL)设计和开发工作. ...
- JVM调优浅谈(转)
1.数据类型 java虚拟机中,数据类型可以分为两类:基本类型和引用类型.基本类型的变量保存原始值,即:它代表的值就是数值本身,而引用类型的变量保存引用值.“引用值”代表了某个对象的引用,而不是对象本 ...