快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

ASP+JS时的符号处理

在asp中basic语句中的字符串中包含js语句,这时处理起间隔符这特别的符号确实是件麻烦事,苦于找不到相应的资料,一时
间头痛万分.现在好了,总算让我想到了解决的办法,原来我这么"后知后觉"啊,呵呵.

struserlist = struserlist & "<a href=\\\'#\\\' onclick=" & chr(34) &_
"sendmsg(\\\'" & usernick & "\\\');return false;" & chr(34) &_
" class=\\\'l_line\\\'><span class=lineinfo>" & usernick & "</span>[/URL]"


呵呵,还没写完,续上:

上面的StrUserList字串被赋值给另一个帧页上的一个表单中隐藏文本单元:
if (top.LineInfo.document.forms.length == 1) {
top.LineInfo.document.forms[0>.userlist.value = "<% =GetAppUserList() %>";
if (top.MainFrame.mylayer != null)
top.MainFrame.ShowLineInfo();
}


在主页帧中显示:

function ShowLineInfo()
{
var userlist;
if (top.LineInfo.document.forms.length == 1)
userlist = top.LineInfo.document.forms[0>.userlist.value
else
userlist = "<span class=\\\'lineinfo\\\'>Welcome to WWW.JSJ02.NET!</span>";
userlist = userlist + " <a href=\\\'<% =path %>/listuser.asp\\\'>" +
"<span class=\\\'lineinfo\\\'>显示列表</span>[/URL]<a href=\\\'#\\\' onclick=\\\'top.RefFrame.location=" +
""<% =path %>/refresh.asp?stat=manu"\\\'><span class=\\\'lineinfo\\\'> 刷新</span>[/URL]";
if (mylayer != null)
{
mylayer.innerHTML = "";
mylayer.filters[0>.Apply();
mylayer.innerHTML = userlist
mylayer.filters[0>.Play();
}
}


mostone ( 2001-7-12 9:50:14 )

呵呵,还没写完,续上:

上面的StrUserList字串被赋值给另一个帧页上的一个表单中隐藏文本单元:
if (top.LineInfo.document.forms.length == 1) {
top.LineInfo.document.forms[0>.userlist.value = "<% =GetAppUserList() %>";
if (top.MainFrame.mylayer != null)
top.MainFrame.ShowLineInfo();
}


在主页帧中显示:

function ShowLineInfo()
{
var userlist;
if (top.LineInfo.document.forms.length == 1)
userlist = top.LineInfo.document.forms[0>.userlist.value
else
userlist = "<span class=\\\'lineinfo\\\'>Welcome to WWW.JSJ02.NET!</span>";
userlist = userlist + " <a href=\\\'<% =path %>/listuser.asp\\\'>" +
"<span class=\\\'lineinfo\\\'>显示列表</span>[/URL]<a href=\\\'#\\\' onclick=\\\'top.RefFrame.location=" +
""<% =path %>/refresh.asp?stat=manu"\\\'><span class=\\\'lineinfo\\\'> 刷新</span>[/URL]";
if (mylayer != null)
{
mylayer.innerHTML = "";
mylayer.filters[0>.Apply();
mylayer.innerHTML = userlist
mylayer.filters[0>.Play();
}
}
返回类别: 教程
上一教程: 怎样读取一个文本文件的内容
下一教程: ASP中实现小偷程序的原理和简朴

您可以阅读与"ASP+JS时的符号处理"相关的教程:
· ASP错误的几种常规处理方法
· ASP事务处理
· 利用JSP的思想来做ASP
· 从ASP迁移至ASP+--处理会话变量
· jsp强于asp,但不是asp.net
    微笑服务 优质保证 索取样品