civ3

编程好玩

导航

deskWeb系列——with trackbackPoster

  下载地址:https://files.cnblogs.com/civ3/deskWeb5.rar
特色:良好配合的桌面Web页;xpsp2安全的ActiveX in Explore(xmldom & xmlhttp);纯粹前台脚本
·简单美化了界面,使用windows定义配色,使用框架frameset.
·增加Trackback Poster
these are available targets:
donews
blogbus
typepad
movble type
wordpress
spaces.msn.com
......
·增加RSS搜索,使用feedss.com的搜索服务
·完善feed的预览与显示机制
以下是Trackback Poster的代码
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
<title>Trackback ping POST</title>
<script>
function tb(){
 txt.innerText="Posting...";
 which=form1;
 title=which.tile.value;
 url=which.url.value;
 excerpt=which.excerpt.value;
 blog_name=which.blog_name.value;
 tar=which.tar.value;
 var str=encodeURI("title="+title+"&url="+url+"&excerpt="+excerpt+"&blog_name="+blog_name);
 var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
 xmlhttp.onreadystatechange=function(){
  txt.innerText+="."
  if(xmlhttp.readyState==4){
   txt.innerText=xmlhttp.responseText;
  } 
 }
 xmlhttp.open("POST",tar,true);
 xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
 xmlhttp.send(str);
}
</script>
</head>

<body>
<form name="form1" method="post" action="" id="form1">
  <table width="100%"  border="0">
    <tr>
      <td width="30%">Title</td>
      <td width="70%"><input name="tile" type="text" id="tile" size="36" maxlength="255"></td>
    </tr>
    <tr>
      <td>Url</td>
      <td><input name="url" type="text" id="url" size="36" maxlength="255"></td>
    </tr>
    <tr>
      <td>excerpt</td>
      <td><textarea name="excerpt" cols="35" id="excerpt"></textarea></td>
    </tr>
    <tr>
      <td>Blog Name </td>
      <td><input name="blog_name" type="text" id="blog_name" size="36" maxlength="255"></td>
    </tr>
    <tr>
      <td>Ping target</td>
      <td><input name="tar" type="text" id="tar" size="36" maxlength="255"></td>
    </tr>
    <tr>
      <td><input name="" type="button" onClick="tb();" value="Post"></td>
      <td>&nbsp;</td>
    </tr>
  </table>
  <p>&nbsp;</p>
</form><div id="txt">Welcome to use tb!</div>
</body>
</html>

posted on 2005-10-06 08:56  civ3's .NET studying  阅读(396)  评论(0编辑  收藏  举报