在asp中basic語(yǔ)句中的字符串中包含js語(yǔ)句,這時(shí)處理起間隔符這特殊的符號(hào)確實(shí)是件麻煩事,苦于找不到相應(yīng)的資料,一時(shí) 間頭痛萬(wàn)分.現(xiàn)在好了,總算讓我想到了解決的辦法,原來(lái)我這么"后知后覺"啊,呵呵.
struserlist = struserlist & "<a href='#' onclick=\" & chr(34) &_ "sendmsg('" & usernick & "');return false;\" & chr(34) &_ " class='l_line'><span class=lineinfo>" & usernick & "</span></a>"
呵呵,還沒(méi)寫完,續(xù)上:
上面的StrUserList字串被賦值給另一個(gè)幀頁(yè)上的一個(gè)表單中隱藏文本單元: if (top.LineInfo.document.forms.length == 1) { top.LineInfo.document.forms[0].userlist.value = "<% =GetAppUserList() %>"; if (top.MainFrame.mylayer != null) top.MainFrame.ShowLineInfo(); }
在主頁(yè)幀中顯示:
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></a><a href='#' onclick='top.RefFrame.location=" + ""<% =path %>/refresh.asp?stat=manu"'><span class='lineinfo'>刷新</span></a>"; if (mylayer != null) { mylayer.innerHTML = ""; mylayer.filters[0].Apply(); mylayer.innerHTML = userlist mylayer.filters[0].Play(); } }
mostone ( 2001-7-12 9:50:14 )
呵呵,還沒(méi)寫完,續(xù)上:
上面的StrUserList字串被賦值給另一個(gè)幀頁(yè)上的一個(gè)表單中隱藏文本單元: if (top.LineInfo.document.forms.length == 1) { top.LineInfo.document.forms[0].userlist.value = "<% =GetAppUserList() %>"; if (top.MainFrame.mylayer != null) top.MainFrame.ShowLineInfo(); }
在主頁(yè)幀中顯示:
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></a><a href='#' onclick='top.RefFrame.location=" + ""<% =path %>/refresh.asp?stat=manu"'><span class='lineinfo'>刷新</span></a>"; if (mylayer != null) { mylayer.innerHTML = ""; mylayer.filters[0].Apply(); mylayer.innerHTML = userlist mylayer.filters[0].Play(); } }
mostone原作
|
溫馨提示:喜歡本站的話,請(qǐng)收藏一下本站!