查看图像按钮的鼠标坐标值 [英] view the mouse coordinate values for image button
本文介绍了查看图像按钮的鼠标坐标值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用此代码将坐标值获取到我的文本框中
i am using this code to get the coordinates values to my textbox
<asp:ImageButton ID="img1" ImageUrl="~/dance-class-for-kids (1).jpg"
runat="server" onclick="img1_Click"/>
</div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
.cs代码为
.cs code is
protected void img1_Click(object sender, ImageClickEventArgs e)
{
TextBox1.Text = e.X.ToString()+","+e.Y.ToString();
}
但是我想在将鼠标移到图像按钮图像上时显示图像坐标值......请帮助我...
获取图像的鼠标坐标值 [ ^ ]
在此处更新您的问题
but i want to display the image coordinates values when i move the mouse on image button image...............plase help me......
Get the mouse coordinate values for image[^]
Update your question here
推荐答案
请不要在新问题上发布旧问题
这是你想要的吗?
Please don''t post new question update old one
Is this What U Want?
<script type="text/javascript" language="javascript">
window.onload = function loadw() {
var b = 0;
var e = document.getElementById('img1');
e.onmousemove = function movemouse(e) {
var tb = document.getElementById('TextBox1');
var x = e.pageX;
var Y = e.pageY;
tb.value = x + "," + Y;
}
}
</script>
<script type="text/javascript" src="http://remysharp.com/js/jquery.js"></script>
<script type="text/javascript" src="http://remysharp.com/downloads/jquery.hint.js"></script>
<script type="text/javascript" charset="utf-8">
window.onload = function loadw() {
var e = document.getElementById('Image1');
e.onmousemove = function movemouse(e) {
var tb = document.getElementById('Image1');
var x = e.pageX;
var Y = e.pageY;
tb.title = x + "," + Y;
(function(){
(function() {
这篇关于查看图像按钮的鼠标坐标值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文