html鼠标悬停显示坐标,js如何在image标签上获取鼠标停留坐标位置

document.getElementById("container").innerHTML = event.offsetX + "," + event.offsetY;

}

left: 0px;

bottom: 0px;

text-align: left;

width:293px;

background-repeat: no-repeat;

height: 190px;

}

usingSystem;usingSystem.Collections.Generic;usingSystem.IO;usingSystem.Linq;usingSystem.Net;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Security.Cryptography.X509Certificates;usingSystem.Net.Security;namespace_0922w

{public partial classWebForm1 : System.Web.UI.Page

{static CookieContainer Cookies = newCookieContainer();staticHttpWebRequest myHttpWebRequest;protected void Page_Load(objectsender, EventArgs e)

{string oneUrl = "https://kyfw.12306.cn/otn/passcodeNew/getPassCodeNew?module=login&rand=sjrand";

myHttpWebRequest= (HttpWebRequest)WebRequest.Create(oneUrl);//请求的URL

myHttpWebRequest.CookieContainer = Cookies;//*发送COOKIE//if (Session["tzcooket"] != null)//myHttpWebRequest.Headers.Set("Set-Cookie", Session["tzcooket"].ToString());

myHttpWebRequest.Method = "GET";

myHttpWebRequest.ContentType= "application/x-www-form-urlencoded";//获取返回资源

HttpWebResponse response =(HttpWebResponse)myHttpWebRequest.GetResponse();

Stream responseStream=response.GetResponseStream();

System.Drawing.Image bitmapImage= System.Drawing.Bitmap.FromStream(responseStream) asSystem.Drawing.Image;string imgName = DateTime.Now.ToString("yyyyMMddHHmmssfff") + ".jpg";

bitmapImage.Save("D:\\documents\\visual studio 2015\\Projects\\0922\\0922w\\image\\" +imgName, System.Drawing.Imaging.ImageFormat.Jpeg);//Image1.ImageUrl = "~/image/1152165471.jpg";

this.container.Style.Remove(HtmlTextWriterStyle.BackgroundImage);this.container.Style.Add(HtmlTextWriterStyle.BackgroundImage, "http://localhost:7520/image/" +imgName);

}

}

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值