?? example9_10.php
字號:
<?php
require ('../xajax.inc.php');
function helloWorld($isCaps)
{
if ($isCaps)
$text = "CLICK ME!";
else
$text = "click me!";
$objResponse = new xajaxResponse();
$objResponse->addAssign("div1","innerHTML",$text);
return $objResponse;
}
function setColor($sColor)
{
$objResponse = new xajaxResponse();
$objResponse->addAssign("div1","style.color", $sColor);
return $objResponse;
}
$xajax = new xajax();
//$xajax->debugOn(); // Uncomment this line to turn debugging on
$xajax->registerFunction("helloWorld");
$xajax->registerFunction("setColor");
$xajax->processRequests();
?>
<html>
<head>
<title>xajax example</title>
<?php $xajax->printJavascript('../'); ?>
</head>
<body style="text-align:center;">
<img src=top.gif width="100%">
<div id="div1" name="div1"> </div>
<br/>
<button onclick="xajax_helloWorld(0)" >Click Me</button>
<button onclick="xajax_helloWorld(1)" >CLICK ME</button>
<script type="text/javascript">
xajax_helloWorld(0);
xajax_setColor(document.getElementById('colorselect').value);
</script>
<table width="100%" style="font-size:12px;border-top-style:solid;border-bottom-style:none;border-right-style:none;border-left-style:none;" cellspacing="0" cellpadding="4" align="center">
<tr>
<td> <div align="center">
IT在中國電腦學習網!@2007</br>
公司地址:鄭州市二七路200號金博大D座2708室</br>
電話:66202195
電子郵件:<A HREF='mailto:liuhaisong9462@sohu.com'></A> itzcn@126.com
</div></td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -