当前位置:首页
开发技术指南» 文章正文
    引言:

 ·asp+dw 写后台问题    »显示摘要«
    摘要: 我用asp 在dreverwaver 2004中根据2004的辅助功能书写连接数据库的语句(就是用2004中的"自定义连接字符串")..........并是在"测试服务器"上测试.....显示脚本连接成功,但我在"数据库"下.点击后(点连接好的那个)...显示是"空" 我数据库里有2个表啊................
    摘要: 全部分给正确提供者。 chcky@126.com ......


jscript如何取得 传过来字符串的值呢

<%  
  dim   id  
  id=request.querystring("id")  
  URL1="URL1.asp?id="&id  
   
  %>  
   
  <script   language="jscript.encode">  
  <!--  
  document.write   ("<object   classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\"   hid=\"MediaPlayer1\">\n")  
  document.write   ("<param   name=\"Filename\"   value="   +   URL1   +   ">\n")  
  document.write   ("<param   name=\"ShowStatusBar\"   value=\"-1\">\n")  
  document.write   ("<PARAM   NAME=\"rate\"   VALUE=\"1\">\n")  
  document.write   ("<PARAM   NAME=\"balance\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"currentPosition\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"defaultFrame\"   VALUE=\"\">\n")  
  document.write   ("<PARAM   NAME=\"playCount\"   VALUE=\"100\">\n")  
  document.write   ("<PARAM   NAME=\"autoStart\"   VALUE=\"-1\">\n")  
  document.write   ("<PARAM   NAME=\"baseURL\"   VALUE=\"\">\n")  
  document.write   ("<PARAM   NAME=\"volume\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"mute\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"uiMode\"   VALUE=\"full\">\n")  
  document.write   ("<PARAM   NAME=\"stretchToFit\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"windowlessVideo\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"enabled\"   VALUE=\"-1\">\n")  
  document.write   ("<PARAM   NAME=\"enableContextMenu\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"fullScreen\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"SAMIFilename\"   VALUE=\"\">\n")  
  document.write   ("<PARAM   NAME=\"captioningID\"   VALUE=\"\">\n")  
  document.write   ("</object>\n")  
  //-->  
  </script>  
   
   
   
  因为在网页中,JSCRIPT脚本语言是在   ASP语言前执行的,所以这里的  
  document.write   ("<param   name=\"Filename\"   value="   +   URL1   +   ">\n")   的URL1   根本还没有得到值  
   
  怎么才能取到这个URL1   的价值了?

NO.1   作者: ghaihua

答完题我就睡了,好困了!!!你试下吧.应该没什么太大的问题.  
   
  <%  
  dim   id  
  id=request.querystring("id")  
  URL1="URL1.asp?id="&id  
   
  %>  
  <%  
  Response.Write("<script   language="&Chr(34)&"jscript.encode"&Chr(34)&">")  
  Response.Write("<!--")  
  Response.Write("document.write   ("&Chr(34)&"<object   classid=\"&Chr(34)&"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\"&Chr(34)&"   hid=\"&Chr(34)&"MediaPlayer1\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<param   name=\"&Chr(34)&"Filename\"&Chr(34)&"   value="&Chr(34)&"   +   "&URL1&"   +   "&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<param   name=\"&Chr(34)&"ShowStatusBar\"&Chr(34)&"   value=\"&Chr(34)&"-1\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"rate\"&Chr(34)&"   VALUE=\"&Chr(34)&"1\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"balance\"&Chr(34)&"   VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"currentPosition\"&Chr(34)&"   VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"defaultFrame\"&Chr(34)&"   VALUE=\"&Chr(34)&"\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"playCount\"&Chr(34)&"   VALUE=\"&Chr(34)&"100\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"autoStart\"&Chr(34)&"   VALUE=\"&Chr(34)&"-1\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"baseURL\"&Chr(34)&"   VALUE=\"&Chr(34)&"\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"volume\"&Chr(34)&"   VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"mute\"&Chr(34)&"   VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"uiMode\"&Chr(34)&"   VALUE=\"&Chr(34)&"full\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"stretchToFit\"&Chr(34)&"   VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"windowlessVideo\"&Chr(34)&"   VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"enabled\"&Chr(34)&"   VALUE=\"&Chr(34)&"-1\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"enableContextMenu\"&Chr(34)&"   VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"fullScreen\"&Chr(34)&"   VALUE=\"&Chr(34)&"0\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"SAMIFilename\"&Chr(34)&"   VALUE=\"&Chr(34)&"\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"<PARAM   NAME=\"&Chr(34)&"captioningID\"&Chr(34)&"   VALUE=\"&Chr(34)&"\"&Chr(34)&">\n"&Chr(34)&")")  
  Response.Write("document.write   ("&Chr(34)&"</object>\n"&Chr(34)&")")  
  Response.Write("//-->")  
  Response.Write("</script>")  
  %>  
 

NO.2   作者: zj135

<%  
  dim   id  
  id=request.querystring("id")  
  URL1="URL1.asp?id="&id  
   
  %>  
  <script   language="jscript.encode">  
  <!--  
  var   URL1   =   "<%=URL1%>";  
  document.write   ("<object   classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\"   hid=\"MediaPlayer1\">\n")  
  document.write   ("<param   name=\"Filename\"   value="   +   URL1   +   ">\n")  
  document.write   ("<param   name=\"ShowStatusBar\"   value=\"-1\">\n")  
  document.write   ("<PARAM   NAME=\"rate\"   VALUE=\"1\">\n")  
  document.write   ("<PARAM   NAME=\"balance\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"currentPosition\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"defaultFrame\"   VALUE=\"\">\n")  
  document.write   ("<PARAM   NAME=\"playCount\"   VALUE=\"100\">\n")  
  document.write   ("<PARAM   NAME=\"autoStart\"   VALUE=\"-1\">\n")  
  document.write   ("<PARAM   NAME=\"baseURL\"   VALUE=\"\">\n")  
  document.write   ("<PARAM   NAME=\"volume\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"mute\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"uiMode\"   VALUE=\"full\">\n")  
  document.write   ("<PARAM   NAME=\"stretchToFit\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"windowlessVideo\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"enabled\"   VALUE=\"-1\">\n")  
  document.write   ("<PARAM   NAME=\"enableContextMenu\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"fullScreen\"   VALUE=\"0\">\n")  
  document.write   ("<PARAM   NAME=\"SAMIFilename\"   VALUE=\"\">\n")  
  document.write   ("<PARAM   NAME=\"captioningID\"   VALUE=\"\">\n")  
  document.write   ("</object>\n")  
  //-->  
  </script>

NO.3   作者: goodera

ghaihua(晨昕)   (   )    
  你的答法和楼主的好象没什么区别哦~~,呵呵

NO.4   作者: goodera

zj135(zj135)   (   )    
  var   URL1   =   "<%=URL1%>";     这里的URL1还是没有不值的``  
  关注下

NO.5   作者: zmgnwpu

var   URL1   =   "<%=URL1%>";   正确的阿,还有网页都是先执行服务端代码的,然后执行客户端代码。


    摘要: system: 红旗linux server 4.0 (内核2.4.20-8smp) 由于红旗linux不能象rh一样自定义安装,所以选择的典型安装. 系统为公司向rf公司购买的产品 联想服务器,4cpu,双核,8g mem。 但出现以下问题,请大家帮忙出点主意。谢谢 1、系统消息如下: sep 13 00:51:23 server syslog: klogd startup succee......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE