谁能帮我编辑一个ASP的设置图片时在网页里面可以显示图片坐标?
把网站的图片放在网页的某一个角落,只需要把鼠标将图片移到那个位置,点击确定后可保存网页并显示图片在指定的地方!ASP的!全分奉贤!我照做了,还是这个提示,我检查了路径没有...
把网站的图片放在网页的某一个角落,只需要把鼠标将图片移到那个位置,点击确定后可保存网页并显示图片在指定的地方!ASP的!全分奉贤!
我照做了,还是这个提示,我检查了路径没有错,我猜是别的原因啊!
输入超出了文件尾
/iinde.asp,行 95
Set FileObject=Server.CreateObject("Scripting.FileSystemObject")
Set Out=FileObject.OpenTextFile(CountFile,1,true)
counter=Out.ReadLine (这里是第95行)
Out.Close 展开
我照做了,还是这个提示,我检查了路径没有错,我猜是别的原因啊!
输入超出了文件尾
/iinde.asp,行 95
Set FileObject=Server.CreateObject("Scripting.FileSystemObject")
Set Out=FileObject.OpenTextFile(CountFile,1,true)
counter=Out.ReadLine (这里是第95行)
Out.Close 展开
1个回答
展开全部
新建一个文本,名字为:record.txt
在文本里写入:
100 100
多写了一个分号而已
电脑上没IIS,不晓得有没错哈:
<%
CountFile=Server.MapPath("record.txt")
if request("m")="t" then
SET FileObject=Server.CreateObject("Scripting.FileSystemObject")
Set Out=FileObject.CreateTextFile(CountFile,TRUE,FALSE)
Application.lock
Out.WriteLine(request("s"))
Application.unlock
Out.Close
end if
Set FileObject=Server.CreateObject("Scripting.FileSystemObject")
Set Out=FileObject.OpenTextFile(CountFile,1,true)
counter=Out.ReadLine
Out.Close
counter=trim(counter)
dim sp
if len(counter)>0 then
sp=split(counter," ")
end if
if sp(0)="" then sp(0)="20"
if sp(1)="" then sp(1)="100"
%>
<style>
body {
margin:0px;
padding:0px;
font-size:12px;
text-align:center;
}
body > div {
text-align:center;
margin-right:auto;
margin-left:auto;
}
.mo {
height:auto;
border:1px solid #CCC;
margin:3px;
background:#FFF;
position:absolute;
}
</style>
<script language="javascript">
function $(_sId){return document.getElementById(_sId);}
function moveStart (event, _sId){
var oObj = $(_sId);
oObj.onmousemove = mousemove;
oObj.onmouseup = mouseup;
oObj.setCapture ? oObj.setCapture() : function(){};
oEvent = window.event ? window.event : event;
var dragData = {x : oEvent.clientX, y : oEvent.clientY};
var backData = {x : parseInt(oObj.style.top), y : parseInt(oObj.style.left)};
function mousemove(){ //鼠标移动时的方法
var oEvent = window.event ? window.event : event;
var iLeft = oEvent.clientX - dragData["x"] + parseInt(oObj.style.left);
var iTop = oEvent.clientY - dragData["y"] + parseInt(oObj.style.top);
oObj.style.left = iLeft;
oObj.style.top = iTop;
dragData = {x: oEvent.clientX, y: oEvent.clientY};
}
function mouseup(){ //放开鼠标键时的方法
var oEvent = window.event ? window.event : event;
oObj.onmousemove = null;
oObj.onmouseup = null;
if(oEvent.clientX < 1 || oEvent.clientY < 1 || oEvent.clientX > document.body.clientWidth || oEvent.clientY > document.body.clientHeight){
oObj.style.left = backData.y;
oObj.style.top = backData.x;
}
oObj.releaseCapture ? oObj.releaseCapture() : function(){};
}
}
function showall(a)
{
var arrAll0=document.getElementById("dom").all;
var s0="";
for(i=0;i <arrAll0.length;i++)
{
if(arrAll0[i].id!="" && arrAll0[i].id!=null)
s0+=arrAll0[i].offsetTop+" "+arrAll0[i].offsetLeft;
}
document.getElementById("ids").value=s0;
if(a==1)
{ alert("详情:\n"+s0);}
}
</script>
<div id="dom">
<div class=mo id=m0 style='position:absolute;top:<%=sp(0)%>px;left:<%=sp(1)%>px;' onMouseDown="javascript:moveStart(event,'m0');">
<img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-zhidao.gif">
</div>
</div>
<div>
<form name="form1" action="?m=t" method="post">
<input type="button" value="显示数据" onclick="showall(1);">
<input type="submit" value="提交吧" onclick="showall(0);">
<input type="hidden" value="" name="ids" id="ids">
</form>
</div>
在文本里写入:
100 100
多写了一个分号而已
电脑上没IIS,不晓得有没错哈:
<%
CountFile=Server.MapPath("record.txt")
if request("m")="t" then
SET FileObject=Server.CreateObject("Scripting.FileSystemObject")
Set Out=FileObject.CreateTextFile(CountFile,TRUE,FALSE)
Application.lock
Out.WriteLine(request("s"))
Application.unlock
Out.Close
end if
Set FileObject=Server.CreateObject("Scripting.FileSystemObject")
Set Out=FileObject.OpenTextFile(CountFile,1,true)
counter=Out.ReadLine
Out.Close
counter=trim(counter)
dim sp
if len(counter)>0 then
sp=split(counter," ")
end if
if sp(0)="" then sp(0)="20"
if sp(1)="" then sp(1)="100"
%>
<style>
body {
margin:0px;
padding:0px;
font-size:12px;
text-align:center;
}
body > div {
text-align:center;
margin-right:auto;
margin-left:auto;
}
.mo {
height:auto;
border:1px solid #CCC;
margin:3px;
background:#FFF;
position:absolute;
}
</style>
<script language="javascript">
function $(_sId){return document.getElementById(_sId);}
function moveStart (event, _sId){
var oObj = $(_sId);
oObj.onmousemove = mousemove;
oObj.onmouseup = mouseup;
oObj.setCapture ? oObj.setCapture() : function(){};
oEvent = window.event ? window.event : event;
var dragData = {x : oEvent.clientX, y : oEvent.clientY};
var backData = {x : parseInt(oObj.style.top), y : parseInt(oObj.style.left)};
function mousemove(){ //鼠标移动时的方法
var oEvent = window.event ? window.event : event;
var iLeft = oEvent.clientX - dragData["x"] + parseInt(oObj.style.left);
var iTop = oEvent.clientY - dragData["y"] + parseInt(oObj.style.top);
oObj.style.left = iLeft;
oObj.style.top = iTop;
dragData = {x: oEvent.clientX, y: oEvent.clientY};
}
function mouseup(){ //放开鼠标键时的方法
var oEvent = window.event ? window.event : event;
oObj.onmousemove = null;
oObj.onmouseup = null;
if(oEvent.clientX < 1 || oEvent.clientY < 1 || oEvent.clientX > document.body.clientWidth || oEvent.clientY > document.body.clientHeight){
oObj.style.left = backData.y;
oObj.style.top = backData.x;
}
oObj.releaseCapture ? oObj.releaseCapture() : function(){};
}
}
function showall(a)
{
var arrAll0=document.getElementById("dom").all;
var s0="";
for(i=0;i <arrAll0.length;i++)
{
if(arrAll0[i].id!="" && arrAll0[i].id!=null)
s0+=arrAll0[i].offsetTop+" "+arrAll0[i].offsetLeft;
}
document.getElementById("ids").value=s0;
if(a==1)
{ alert("详情:\n"+s0);}
}
</script>
<div id="dom">
<div class=mo id=m0 style='position:absolute;top:<%=sp(0)%>px;left:<%=sp(1)%>px;' onMouseDown="javascript:moveStart(event,'m0');">
<img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-zhidao.gif">
</div>
</div>
<div>
<form name="form1" action="?m=t" method="post">
<input type="button" value="显示数据" onclick="showall(1);">
<input type="submit" value="提交吧" onclick="showall(0);">
<input type="hidden" value="" name="ids" id="ids">
</form>
</div>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询