欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
博客園 - liuxiaoyi666 - web下的投票系統設計

投票的選擇的不確定性常常使我們在設計數據庫的時(shí)候感到無(wú)從下手。所以我用的不是數據庫保存的投票選項而是用的xml。用xml的設計的好處有很多,其中包括我們可以在其中保留很多的屬性,在設計的時(shí)候,也可以進(jìn)行多重選擇都是一個(gè)很好的辦法,用xsl對生成的xml文件進(jìn)行解析這樣的設計模式感覺(jué)很爽

我的xml的sample是這樣的
<?xml version=‘1.0‘ encoding=‘gb2312‘ ?>
<?xml-stylesheet type=‘text/xsl‘ href=‘votesample.xsl‘?>
<root>
<Questionname><![CDATA[我們的網(wǎng)站好看么?]]></Questionname>
<Choose select=‘radio‘ votekindid=‘1‘>
  <ChooseItem value=‘a(chǎn)‘><![CDATA[好看]]></ChooseItem>
  <ChooseItem value=‘b‘><![CDATA[不好看]]></ChooseItem>
  <ChooseItem value=‘c‘><![CDATA[不知道]]></ChooseItem>
  <ChooseItem value=‘d‘><![CDATA[無(wú)所謂]]></ChooseItem>
</Choose>
</root>

xsl的sample:
<?xml version="1.0" encoding="gb2312" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="<xsl:output method="xml" indent="yes" encoding="GB2312" />
<xsl:template match="/">
  <div>
    <div><xsl:value-of select="http://root/Questionname" /></div>
    <table width="95%">
       <xsl:variable name="inputelement" select="
//root/Choose/@select" />
       <form action="vote/record.asp" target="observe" method="post">
       <input type="hidden" name="votekindid" value="{//root/Choose/@votekindid}" />
          <xsl:for-each select="http://root/Choose/ChooseItem">
      <tr>
         <td align="left"><input type="{$inputelement}" name="choise" value="{@value}"><xsl:if test="position()=1"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if></input><xsl:value-of select="@value" /></td><td align="left" width="80%"><xsl:value-of select="." /></td>
      </tr>  
   </xsl:for-each>
      <tr><td align="center"></td><td align="left"><img src="images/index_left_button3.gif" onclick="javascript:newWin(‘vote/result.asp?votekindid={//root/Choose/@votekindid}‘)" style="cursor:hand;" />  <input type="image" src="images/index_left_button4.gif" value="提交" onclick="javascript:newWin()" /></td></tr>
       </form>
    </table>
  </div>
  <script language="javascript">
  <![CDATA[
  function newWin(url){
  if(url==‘‘){
  newWindow=window.open("about:blank","observe","toolbar,resizable,scrollbars,dependent,width=500,height=420,left=150,top=80");
  newWindow.focus();}
  else{
  newWindow=window.open(url,"observe","toolbar,resizable,scrollbars,dependent,width=500,height=420,left=150,top=80");
  newWindow.focus();
  }
  }
  ]]>
  </script>
</xsl:template>
</xsl:stylesheet>

然后用一個(gè)vote表,記錄一下值
用一個(gè)sql語(yǔ)句 select votechoose,count(votechoose) from vote where voteid=值 group by votechoose 進(jìn)行統計

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
XML查看對應的 XSLT 樣式表
XML 論壇
XSLT轉換XML小結
制作SF左圖右介紹標簽
如何在XML中使用nbsp
xml的DTD元素屬性的定義格式
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久