动网论坛,站长建站首选,国内使用量最多的论坛软件 动网论坛官方技术讨论区 站长工具 申请属于您自己的免费论坛
首页 | 新闻资讯 | 网站运营 | 网络编程 | 数据库 | 服务器 | 网页设计 | 图像媒体 | 网络应用 | 搜索优化 | 资源下载 | 动网主机 | DVBOX
    本站内  互联网 ASP论坛  ASP.Net论坛  PHP论坛
  
   PHP → 阅读文章

 VML绘图板⑤浏览--view.php

作者来源: 
阅读 数 621 人次 , 2006-3-29 4:13:00 


<html>
<xmlns:v="urn:schemas-microsoft-com:vml" />
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>vml绘图板</title>
<style>
v\:* { behavior: url(#default#vml); }
td { font-size:9pt; }
</style>
</head>
<script src="xmltool.js"></script>
<script>
// 钩子函数,用于清除代码显示
function hooke() {
code.innertext = "";
}
// 从服务器获取xml文档。服务器将返回vml文档,可以根据参数v简单的用readfile函数
function loadxml(v)
{
var xmlhttp = new activexobject("microsoft.xmlhttp");
xmlhttp.open("get","server.php?info="+v,false);
xmlhttp.setrequestheader("contrn-type","text/xml");
xmlhttp.setrequestheader("contrn-charset","gb2312");

xmlhttp.send(v);
view.innerhtml = xmlhttp.responsetext;
hooke();
if(xmlhttp.responsetext.indexof("error:")!=-1) {
alert(xmlhttp.responsetext);
}
}
// 以下函数用于与vml文档交互
function cursor() {}
function mouse_down() {}
function mouse_up() {}
function setovercolor() {}
function setoutcolor() {}
function deletenode() {}
</script>
<body onload="loadxml(1)">
<table>
<tr>
<td>作品展示</td>
</tr>
<tr>
<td id="view"></td>
</tr>
<tr>
<td>
<?php
// 变量num为保存的vml文档总数,这里仅简单的指定。请根据实际的组织调整
$num = 10;
for($i=1;$i<=$num;$i++)
echo sprintf("<span style=\"cursor:hand;\" onclick=\"loadxml(%d)\" nobr>%4d</span>\n",$i,$i);
?>
</td>
</tr>
<tr>
<td style="cursor:help;" onclick="code.innertext=view.innerhtml">查看vml代码</td>
</tr>
<tr>
<td id="code"></td>
</tr>
</table>
</body>
</html>

 
 收藏本文  打印本文  论坛讨论  关闭窗口
· 上一篇:VML绘图板④简化的服务器端--server.php、server.asp
· 下一篇:用PHP工具包expat解析XML
· 学习用php创建多页表单
· 关于使用 file() 读入整个文件时出现的异常断行错误
· 在phpMyAdmin使用用户口令登陆
· 分页显示ODBC数据库记录的类
· PHP的面向对象编程:开发大型PHP项目的方法(一)


关于本站 | 联系我们 | 业务合作 | 客户案例 | 诚聘英才 | 广告合作 | 收藏本站
海口动网先锋网络科技有限公司版权所有
Copyright © 2000 - 2006 Cndw.Com
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077