VML繪圖板⑤瀏覽--view.php

發表于:2007-07-14來源:作者:點擊數: 標簽:
html xmlns:v=urn:schemas-microsoft-com:vml / head meta http-equiv=Content-type content=text/html; charset=gb2312 titleVML繪圖板/title style v\:* { behavior: url(#default#VML); } td { font-size:9pt; } /style /head script src=XMLtool.js/scri


<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>

原文轉自:http://www.anti-gravitydesign.com

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97