难题征解呀,各位帮帮

xtuwz 2006-02-17 08:19:53
想问问
1.有没有做过ASP生成统计图的那种效果.以前在CSDN看到过,后来硬盘格了没了.()

2.让当前页的TEXT的内容在刷新后不丢失(当前页)

任回答一个都给分..谢谢
...全文
124 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
Hellohuan 2006-02-20
  • 打赏
  • 举报
回复
不太明白

+up +jf

--------------------
我用ASP写的技术社区:
http://udclub.com/cn/community/default.html
是是非非 2006-02-20
  • 打赏
  • 举报
回复
第一个问题就不说了

第二个问题,除了Cookie之外,还可以用userData这个behavior在IE上可以很方便的实现

userData Behavior

--------------------------------------------------------------------------------

Enables the object to persist data in user data.

Syntax

XML <Prefix: CustomTag ID=sID STYLE="behavior:url('#default#userData')" />
HTML <ELEMENT STYLE="behavior:url('#default#userData')" ID=sID>
Scripting object.style.behavior = "url('#default#userData')"
object.addBehavior ("#default#userData")

Possible Values

Prefix Prefix that associates the CustomTag with an XML namespace. This prefix is set using the XMLNS attribute of the HTML tag.
CustomTag User-defined tag.
sID String that specifies a unique identifier for the object.


Members Table

The following table lists the members exposed by the userData object. Click a tab on the left to choose the type of member you want to view.

Attributes/Properties

Show:
Attributes/Properties
Methods
Method Description
getAttribute Retrieves the value of the specified attribute.
load Loads an object participating in userData persistence from a UserData store.
removeAttribute Removes the specified attribute from the object.
save Saves an object participating in userData persistence to a UserData store.
setAttribute Sets the value of the specified attribute.

Property Description
expires Sets or retrieves the expiration date of data persisted with the userData behavior.
XMLDocument Retrieves a reference to the XML Document Object Model (DOM) exposed by the object.




Attributes/Properties

Methods

Remarks

Security Alert For security reasons, a UserData store is available only in the same directory and with the same protocol used to persist the store.
Security Alert Using this behavior incorrectly can compromise the security of your application. Data in a UserData store is not encrypted and therefore not secure. Any application that has access to the drive where UserData is saved has access to the data. Therefore, it is recommended that you not persist sensitive data like credit card numbers. For more information, see Security Considerations: DHTML and Default Behaviors.
The userData behavior persists information across sessions by writing to a UserData store. This provides a data structure that is more dynamic and has a greater capacity than cookies. The capacity of the UserData store depends on the security zone of the domain. The following table shows the maximum amount of UserData storage that is available for an individual document and also the total available for an entire domain, based on the security zone.

Security Zone Document Limit (KB) Domain Limit (KB)
Local Machine 128 1024
Intranet 512 10240
Trusted Sites 128 1024
Internet 128 1024
Restricted 64 640


The userData behavior persists data across sessions, using one UserData store for each object. The UserData store is persisted in the cache using the save and load methods. Once the UserData store has been saved, it can be reloaded even if Microsoft® Internet Explorer has been closed and reopened.

Setting the userData behavior class on the html, head, title, or style object causes an error when the save or load method is called.

The required style can be set inline or in the document header, as follows:

<STYLE>
.storeuserData {behavior:url(#default#userData);}
</STYLE>

An ID is optional for userData, but including one improves performance.

The userData behavior is available as of Internet Explorer 5, in the Microsoft Win32® and Unix platforms.

Examples

This example uses the userData behavior to preserve information in a UserData Store.

Show Example

<HTML>
<HEAD>
<STYLE>
.storeuserData {behavior:url(#default#userData);}
</STYLE>
<SCRIPT>
function fnSaveInput(){
var oPersist=oPersistForm.oPersistInput;
oPersist.setAttribute("sPersist",oPersist.value);
oPersist.save("oXMLBranch");
}
function fnLoadInput(){
var oPersist=oPersistForm.oPersistInput;
oPersist.load("oXMLBranch");
oPersist.value=oPersist.getAttribute("sPersist");
}
</SCRIPT>
</HEAD>
<BODY>
<FORM ID="oPersistForm">
<INPUT CLASS="storeuserData" TYPE="text" ID="oPersistInput">
<INPUT TYPE="button" VALUE="Load" onclick="fnLoadInput()">
<INPUT TYPE="button" VALUE="Save" onclick="fnSaveInput()">
</FORM>
</BODY>
</HTML>
Show Me
The following example uses the userData behavior in a custom tag to preserve information in a UserData Store.

Show Example

<HTML XMLNS:sdk>
<HEAD>
<STYLE>
sdk\:cacher {behavior:url(#default#userData);}
</STYLE>
<SCRIPT>
function fnSaveInput(){
cachetag.setAttribute("sPersist",txt1.value);
cachetag.save("cache");
}
function fnLoadInput(){
cachetag.load("cache");
cachetag.value=cachetag.getAttribute("sPersist");
}
</SCRIPT>
</HEAD>
<BODY>
<sdk:cacher id="cachetag"></sdk:cacher>
<INPUT TYPE="button" VALUE="Load" onclick="fnLoadInput()">
<INPUT TYPE="button" VALUE="Save" onclick="fnSaveInput()">
<INPUT TYPE="text" ID="txt1" VALUE="some value">
</BODY>
</HTML>
Applies To

[ Object Name ]
Platform Version
Win32:
Unix:
Version data is listed when the mouse hovers over a link, or the link has focus.
A, ACRONYM, ADDRESS, AREA, B, BIG, BLOCKQUOTE, BUTTON, CAPTION, CENTER, CITE, CODE, DD, DEL, DFN, DIR, DIV, DL, DT, EM, FONT, FORM, hn, HR, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LI, LISTING, MAP, MARQUEE, MENU, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, XMP
Move the mouse pointer over an element in the Applies To list to display availability information for the listed platforms. Internet Explorer does not expose this member on platforms that are not listed.

See Also

Introduction to DHTML Behaviors, Introduction to Persistence

--------------------------------------------------------------------------------

© 2003 Microsoft Corporation. All rights reserved.
yousite1 2006-02-20
  • 打赏
  • 举报
回复
这个的代码本来我有下过,但今天看到你的消息去找没找到。
只搜索到这个历史贴,连接也下不了了,你直接跟楼主联系一下吧。。没帮上什么忙。
yousite1 2006-02-20
  • 打赏
  • 举报
回复
参照这个:
http://topic.csdn.net/t/20030813/22/2143612.html
moodboy1982 2006-02-18
  • 打赏
  • 举报
回复
一个简单的问题,大家干嘛搞得那么复杂呀,竟用上了VML呀!?
孟子E章 2006-02-18
  • 打赏
  • 举报
回复
参照
http://msdn.microsoft.com/workshop/author/persistence/overview.asp
xtuwz 2006-02-18
  • 打赏
  • 举报
回复
2.让当前页的TEXT的内容在刷新后不丢失(当前页),现以解决.
<form name="form1" method="post" action="" style="margin:0px">
查詢<input type="text" name="numdate" size=5 class="sHistory" value=<%=request("numdate")%>>日前的資料
<input type="submit" value="查詢"><input type="reset" value="清空">(注:只能为数字)</form>


呜:加句这样的就行value=<%=request("numdate")%>,当时一时急忘了
xtuwz 2006-02-18
  • 打赏
  • 举报
回复
请各位都说说,VML,JS,VBS,能实现就行,lisoon兄,不行呀,一提交就没了
超级大笨狼 2006-02-17
  • 打赏
  • 举报
回复
<OBJECT
id=S
style="LEFT: 0px; WIDTH: 500px; TOP: 0px; HEIGHT: 500px;border:1px solid black"
classid="clsid:369303C2-D7AC-11D0-89D5-00A0C90833E6"
VIEWASTEXT>
</OBJECT>
<SCRIPT language="vbscript">
' 笨狼画方程曲线.htm
'画坐标系
coordinate
'画方程
chart(makeStr("100 * (x^(-2))"))
sub coordinate
'画坐标系
text "0,0",0,0

draw 0,0,100,0
text "x轴",100,0

draw 0,0,0,100
text "y轴",0,100
end sub
sub text(Str,x,y)
S.DrawingSurface.Text Str,x*4-200,y*-4+200
end sub
sub draw(x1,y1,x2,y2)
S.DrawingSurface.Line (x1*4)-200,(-4 * y1)+200,(x2*4)-200,(-4 * y2+200)
end sub
sub chart(str)
dim Arr
Arr = split(str,",")
text cint(Arr(0)) & "," & cint(Arr(1)),cint(Arr(0)),cint(Arr(1))
x=cint(Arr(0))
y=cint(Arr(1))
for i=2 to ubound(Arr)-1 step 2
draw x,y,cint(Arr(i)),cint(Arr(i+1))
text cint(Arr(i)) & "," & cint(Arr(i+1)),cint(Arr(i)),cint(Arr(i+1))
x=cint(Arr(i))
y=cint(Arr(i+1))
next
end sub
function makeStr(func)
dim str,x
for x=1 to 10
str = str & "," & x*10
str = str & "," & eval(func)
next
str = mid(str,2)
makeStr = str
end function
</SCRIPT>
超级大笨狼 2006-02-17
  • 打赏
  • 举报
回复



<body bgColor=#FFFFFF>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-size:10pt; text-align:center; position:relative" bordercolor="#111111" width="100%" id="AutoNumber19" height="87">

<tr>

<td width="100%" title="??????????????">

<OBJECT ID=SG1

STYLE="Position:relative;top:0;left:0;"

CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" width="300" height="110">

<param name="SourceURL" value>

<param name="CoordinateSystem" value="0">

<param name="MouseEventsEnabled" value="0">

<param name="HighQuality" value="0">

<param name="PreserveAspectRatio" value="-1">

</OBJECT>

<SCRIPT LANGUAGE="javaScript">

var ds

lib = SG1.Library // ??DirectAnimation?



ds=SG1.DrawSurface

xp=-144

yp=54

ds.fillcolor(lib.colorRgb255(225,243,255)) // ??????

ds.LineStyle = lib.DefaultLineStyle.Color(lib.colorRgb255(181,185,188))

ds.rect(-5+xp,-105+yp,442+xp,51+yp)

for (i=1;i<5;i++){

ds.line(-4+xp,-21*i+yp,292+xp,-21*i+yp)}

for (i=1;i<12;i++){

ds.line(-5+25*i+xp,-104+yp,-5+25*i+xp,-1+yp)}

ds.LineStyle = lib.DefaultLineStyle.Color(lib.Purple)



ds.line(0+xp,-36+yp,1+xp,-36+yp)



ds.line(1+xp,-36+yp,2+xp,-37+yp)



ds.line(2+xp,-37+yp,3+xp,-37+yp)



ds.line(3+xp,-37+yp,4+xp,-31+yp)



ds.line(4+xp,-31+yp,5+xp,-33+yp)



ds.line(5+xp,-33+yp,6+xp,-36+yp)



ds.line(6+xp,-36+yp,7+xp,-34+yp)



ds.line(7+xp,-34+yp,8+xp,-33+yp)



ds.line(8+xp,-33+yp,9+xp,-32+yp)



ds.line(9+xp,-32+yp,10+xp,-33+yp)



ds.line(10+xp,-33+yp,11+xp,-32+yp)



ds.line(11+xp,-32+yp,12+xp,-32+yp)



ds.line(12+xp,-32+yp,13+xp,-32+yp)



ds.line(13+xp,-32+yp,14+xp,-31+yp)



ds.line(14+xp,-31+yp,15+xp,-26+yp)



ds.line(15+xp,-26+yp,16+xp,-30+yp)



ds.line(16+xp,-30+yp,17+xp,-30+yp)



ds.line(17+xp,-30+yp,18+xp,-30+yp)



ds.line(18+xp,-30+yp,19+xp,-30+yp)



ds.line(19+xp,-30+yp,20+xp,-28+yp)



ds.line(20+xp,-28+yp,21+xp,-30+yp)



ds.line(21+xp,-30+yp,22+xp,-30+yp)



ds.line(22+xp,-30+yp,23+xp,-30+yp)



ds.line(23+xp,-30+yp,24+xp,-29+yp)



ds.line(24+xp,-29+yp,25+xp,-25+yp)



ds.line(25+xp,-25+yp,26+xp,-29+yp)



ds.line(26+xp,-29+yp,27+xp,-29+yp)



ds.line(27+xp,-29+yp,28+xp,-30+yp)



ds.line(28+xp,-30+yp,29+xp,-24+yp)



ds.line(29+xp,-24+yp,30+xp,-30+yp)



ds.line(30+xp,-30+yp,31+xp,-28+yp)



ds.line(31+xp,-28+yp,32+xp,-28+yp)



ds.line(32+xp,-28+yp,33+xp,-28+yp)



ds.line(33+xp,-28+yp,34+xp,-27+yp)



ds.line(34+xp,-27+yp,35+xp,-24+yp)



ds.line(35+xp,-24+yp,36+xp,-27+yp)



ds.line(36+xp,-27+yp,37+xp,-26+yp)



ds.line(37+xp,-26+yp,38+xp,-27+yp)



ds.line(38+xp,-27+yp,39+xp,-23+yp)



ds.line(39+xp,-23+yp,40+xp,-27+yp)



ds.line(40+xp,-27+yp,41+xp,-27+yp)



ds.line(41+xp,-27+yp,42+xp,-27+yp)



ds.line(42+xp,-27+yp,43+xp,-27+yp)



ds.line(43+xp,-27+yp,44+xp,-26+yp)



ds.line(44+xp,-26+yp,45+xp,-24+yp)



ds.line(45+xp,-24+yp,46+xp,-31+yp)



ds.line(46+xp,-31+yp,47+xp,-30+yp)



ds.line(47+xp,-30+yp,48+xp,-31+yp)



ds.line(48+xp,-31+yp,49+xp,-30+yp)



ds.line(49+xp,-30+yp,50+xp,-28+yp)



ds.line(50+xp,-28+yp,51+xp,-30+yp)



ds.line(51+xp,-30+yp,52+xp,-30+yp)



ds.line(52+xp,-30+yp,53+xp,-29+yp)



ds.line(53+xp,-29+yp,54+xp,-31+yp)



ds.line(54+xp,-31+yp,55+xp,-26+yp)



ds.line(55+xp,-26+yp,56+xp,-29+yp)



ds.line(56+xp,-29+yp,57+xp,-29+yp)



ds.line(57+xp,-29+yp,58+xp,-28+yp)



ds.line(58+xp,-28+yp,59+xp,-30+yp)



ds.line(59+xp,-30+yp,60+xp,-28+yp)



ds.line(60+xp,-28+yp,61+xp,-29+yp)



ds.line(61+xp,-29+yp,62+xp,-31+yp)



ds.line(62+xp,-31+yp,63+xp,-31+yp)



ds.line(63+xp,-31+yp,64+xp,-32+yp)



ds.line(64+xp,-32+yp,65+xp,-29+yp)



ds.line(65+xp,-29+yp,66+xp,-30+yp)



ds.line(66+xp,-30+yp,67+xp,-31+yp)



ds.line(67+xp,-31+yp,68+xp,-33+yp)



ds.line(68+xp,-33+yp,69+xp,-32+yp)



ds.line(69+xp,-32+yp,70+xp,-29+yp)



ds.line(70+xp,-29+yp,71+xp,-29+yp)



ds.line(71+xp,-29+yp,72+xp,-33+yp)



ds.line(72+xp,-33+yp,73+xp,-36+yp)



ds.line(73+xp,-36+yp,74+xp,-36+yp)



ds.line(74+xp,-36+yp,75+xp,-35+yp)



ds.line(75+xp,-35+yp,76+xp,-33+yp)







SG1.DrawSurface = ds // ???????

// ??????

</SCRIPT></td>

</tr>

</table>

</body>
超级大笨狼 2006-02-17
  • 打赏
  • 举报
回复
提供个思路,用hidden来存储值..
demo.htm
<script>
//用hidden记录层位置变化,刷新后,位置不变.
/* Start */
window.onbeforeunload=function()
{
document.all.leftpos.value = parseInt(bao.style.left);
document.all.toppos.value = parseInt(bao.style.top);
}
window.onload=function()
{
if(document.all.leftpos.value!="")bao.style.left=document.all.leftpos.value+"px";
if(document.all.toppos.value!="")bao.style.top=document.all.toppos.value+"px";
}
/* End */
function beginDrag(elementToDrag,event) {
var delatX=event.clientX-parseInt(elementToDrag.style.left);
var delatY=event.clientY-parseInt(elementToDrag.style.top);
document.attachEvent("onmousemove",moveHandler);
document.attachEvent("onmouseup",upHandler);
event.cancelBubble=true;
event.returnValue=false;
function moveHandler(e) {
if(!e) e=window.event;
elementToDrag.style.left=(e.clientX-delatX)+"px";
elementToDrag.style.top=(e.clientY-delatY)+"px";
e.cancelBubble=true;
}
function upHandler(e) {
if(!e) e=window.event;
document.detachEvent("onmouseup",upHandler);
document.detachEvent("onmousemove",moveHandler);
e.cancelBubble=true;
elementToDrag.style.left=elementToDrag.style.left;
elementToDrag.style.top=elementToDrag.style.top;
}
}
</script>
<input type="image" src="csdn.gif" id=bao
style="position:absolute;left:0px;top:0px;"
onmousedown="beginDrag(this,event);">
<input type="hidden" name="leftpos">
<input type="hidden" name="toppos">
ckl881003 2006-02-17
  • 打赏
  • 举报
回复
第二个问题其实有满多方法的
比如说COOKIES
或者用服务端session也能解决
又或者开个窗口做个数据临时中转处也行亚 方法多啦
lisoon 2006-02-17
  • 打赏
  • 举报
回复
1。看置顶的精华贴。
2。如下,不过不支持多个同名text.
<HTML>
<HEAD>
<META NAME="save" CONTENT="history">
<STYLE>
.sHistory {behavior:url(#default#savehistory);}
</STYLE>
</HEAD>
<BODY>
<INPUT class=sHistory type=text id=oPersistInput>
</BODY>
</HTML>
ybfqlyq 2006-02-17
  • 打赏
  • 举报
回复
第一個,在ASP版塊置頂的主題裡JSPADMIN收集的精華裡有呀。。
第二個,用COOKIES保存就可以了,調用BODY的ONUNLOAD事件
KimSoft 2006-02-17
  • 打赏
  • 举报
回复
1、用VML
2、用cookie

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧