收藏本站腾讯微博新浪微博

经典论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

蓝色理想 最新研发动态 网站开通淘帖功能 - 蓝色理想插件 论坛内容导读一页看论坛 - 给官方提建议

论坛活动及任务 地图和邮件任务 请多用悬赏提问 热夏来袭,选一款蓝色理想的个性T恤吧!

手机上论坛,使用APP获得更好体验 急需前端攻城狮,获得内部推荐机会 论坛开通淘帖功能,收藏终于可以分类了!

搜索
查看: 2202|回复: 0

[asp] ok3w news新闻系统新闻感受选择修改

[复制链接]
发表于 2010-6-2 15:55:50 | 显示全部楼层 |阅读模式
修改这个程序遇到一个问题, 我想改变每篇文章底部显示的 "您读过此篇文章后的感受是:"里的选择数量

参看:http://www.ok3w.net/article/44987.html

看附件较图片,看到显示新闻的是 show.asp 调用了以下 vote_a.js
vote_a.js调用了ajax.js里三个函数

我把八项修改到四项后,再点“感受”按钮失效。  不知道这里有没有人也遇到过同样 的问题。 还请不吝赐教一下啊

这个是vote_a.js 我把里面修改 colspan=4,选择保留前四个其他删掉
  1. document.write('<table border="0" align="center" cellpadding="0" cellspacing="0">');
  2. document.write('<form method="post" action="">');
  3. document.write('<input type="hidden" name="mood" />');
  4. document.write('<tr>');
  5. document.write('<td height="20" colspan="8" align="left" valign="middle" scope="col">您读过此篇文章后的感受是:</td>');
  6. document.write('</tr>');
  7. document.write('<tr>');
  8. document.write('  <td width="60" height="80" align="center" valign="bottom" scope="col"> <span id="moodnum1">0</span><br />');
  9. document.write('      <img id="moodimg1" name="" src="'+mbPath+'images/mood/101.gif" width="20" height="1" /></td>');
  10. document.write('  <td width="60" align="center" valign="bottom" scope="col"> <span id="moodnum2">0</span><br />');
  11. document.write('      <img id="moodimg2" src="'+mbPath+'images/mood/100.gif" width="20" height="1" /></td>');
  12. document.write('  <td width="60" align="center" valign="bottom" scope="col"> <span id="moodnum3">0</span><br />');
  13. document.write('      <img id="moodimg3" src="'+mbPath+'images/mood/101.gif" width="20" height="1" /></td>');
  14. document.write('  <td width="60" align="center" valign="bottom" scope="col"> <span id="moodnum4">0</span><br />');
  15. document.write('      <img id="moodimg4" src="'+mbPath+'images/mood/101.gif" width="20" height="1" /></td>');
  16. document.write('  <td width="60" align="center" valign="bottom" scope="col"> <span id="moodnum5">0</span><br />');
  17. document.write('      <img id="moodimg5" src="'+mbPath+'images/mood/101.gif" width="20" height="1" /></td>');
  18. document.write('  <td width="60" align="center" valign="bottom" scope="col"> <span id="moodnum6">0</span><br />');
  19. document.write('      <img id="moodimg6" src="'+mbPath+'images/mood/101.gif" width="20" height="1" /></td>');
  20. document.write('  <td width="60" align="center" valign="bottom" scope="col"> <span id="moodnum7">0</span><br />');
  21. document.write('      <img id="moodimg7" src="'+mbPath+'images/mood/101.gif" width="20" height="1" /></td>');
  22. document.write('  <td width="60" align="center" valign="bottom" scope="col"> <span id="moodnum8">0</span><br />');
  23. document.write('      <img id="moodimg8" src="'+mbPath+'images/mood/101.gif" width="20" height="1" /></td>');
  24. document.write('</tr>');
  25. document.write('<tr>');
  26. document.write('  <td height="50" align="center" style="cursor:pointer;" onClick="Ok3w_Article_Hits_Mood(mbPath,ArticleID,1)" title="点击投票"><img src="'+mbPath+'images/mood/1.gif" width="40" height="40" /></td>');
  27. document.write('  <td align="center" style="cursor:pointer;" onClick="Ok3w_Article_Hits_Mood(mbPath,ArticleID,2)" title="点击投票"><img src="'+mbPath+'images/mood/2.gif" width="40" height="40" /></td>');
  28. document.write('  <td align="center" style="cursor:pointer;" onClick="Ok3w_Article_Hits_Mood(mbPath,ArticleID,3)" title="点击投票"><img src="'+mbPath+'images/mood/3.gif" width="40" height="40" /></td>');
  29. document.write('  <td align="center" style="cursor:pointer;" onClick="Ok3w_Article_Hits_Mood(mbPath,ArticleID,4)" title="点击投票"><img src="'+mbPath+'images/mood/4.gif" width="40" height="40" /></td>');
  30. document.write('  <td align="center" style="cursor:pointer;" onClick="Ok3w_Article_Hits_Mood(mbPath,ArticleID,5)" title="点击投票"><img src="'+mbPath+'images/mood/5.gif" width="40" height="40" /></td>');
  31. document.write('  <td align="center" style="cursor:pointer;" onClick="Ok3w_Article_Hits_Mood(mbPath,ArticleID,6)" title="点击投票"><img src="'+mbPath+'images/mood/6.gif" width="40" height="40" /></td>');
  32. document.write('  <td align="center" style="cursor:pointer;" onClick="Ok3w_Article_Hits_Mood(mbPath,ArticleID,7)" title="点击投票"><img src="'+mbPath+'images/mood/7.gif" width="40" height="40" /></td>');
  33. document.write('  <td align="center" style="cursor:pointer;" onClick="Ok3w_Article_Hits_Mood(mbPath,ArticleID,8)" title="点击投票"><img src="'+mbPath+'images/mood/8.gif" width="40" height="40" /></td>');
  34. document.write('</tr>');
  35. document.write('<tr>');
  36. document.write('  <td align="center">欠扁</td>');
  37. document.write('  <td align="center">支持</td>');
  38. document.write('  <td align="center">很棒</td>');
  39. document.write('  <td align="center">找骂</td>');
  40. document.write('  <td align="center">搞笑</td>');
  41. document.write('  <td align="center">扯淡</td>');
  42. document.write('  <td align="center">不解</td>');
  43. document.write('  <td align="center">吃惊</td>');
  44. document.write('</tr>');
  45. document.write('</form>');
  46. document.write('</table>');
复制代码


以上调用ajax.js里面的函数是:
  1. function Ok3w_Article_Hits_Mood(dns,ID,mood)
  2. {
  3.         if(__ajax_ok)
  4.         {
  5.                 __ajax_ok = false;
  6.                 __ajax_dns = dns;
  7.                 var __id = ID;
  8.                 var __mood = mood;
  9.                 var url = dns + "inc/ajax.asp?rnd=" + Math.random();
  10.                 var send = "action=Article_Hits&ID=" + __id + "&mood=" + __mood;
  11.                 SendRequest(url,send,Ok3w_Article_Hits_Mood_Ok);
  12.         }       
  13. }

  14. function Ok3w_Article_Hits_Mood_Ok(xmlHttp)
  15. {
  16.         var ok = xmlHttp.responseText;
  17.         if(ok.indexOf("|")>-1)
  18.         {
  19.                 var tmp = ok.split("|");
  20.                 var hits = tmp[0];
  21.                 var mTmp = tmp[1].split(",");
  22.                 var mITmp = tmp[2].split(",");
  23.                 var plnum = tmp[3];
  24.                
  25.                 document.getElementById("News_Hits").innerHTML = hits;
  26.                
  27.                 for(var i=1;i<=8;i++)  //i原来是8项 2010.06.03改为4
  28.                 {
  29.                         if(mITmp[i-1]==0)
  30.                                 mITmp[i-1]=1
  31.                         document.getElementById("moodimg" + i).style.height = mITmp[i-1] + "px";
  32.                         document.getElementById("moodnum" + i).innerHTML = mTmp[i-1];
  33.                 }
  34.                
  35.                 if(document.getElementById("plnum"))
  36.                 {
  37.                         document.getElementById("plnum").innerHTML = plnum;
  38.                 }
  39.         }
  40.         else
  41.         {
  42.                  Ok3w_Ajax_Alert(ok,0);
  43.         }
  44.         __ajax_ok=true;
  45. }
复制代码

[[i] 本帖最后由 waichun 于 2010-6-2 15:59 编辑 ]
1.gif
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|Archiver|手机版|blueidea.com ( 湘ICP备12001430号 )  

GMT+8, 2020-9-19 11:45 , Processed in 0.093513 second(s), 10 queries , Gzip On, Memcache On.

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表