收藏本页 | 网站地图 | 投稿指南
 
 
当前位置:首页 >> 学院首页 >> 程序开发 >> ASP >>

ASP+JS时的符号处理

放大字体  缩小字体  At: 2005-10-04 02:08  By: master8 转载 来源: 互联网
在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();
}

 






         









 
Google
论坛精华  
 
 
  ©2005-2008 站长吧 Master8.NET All Rights Reserved 陕ICP备05010609号