通过点击div在div之间画线... [英] Draw line between div by click on div...

查看:215
本文介绍了通过点击div在div之间画线...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我点击图像,月亮和下一个图像的星形绘制线b / w它们。接下来我点击orbitalradius它们绘制开始到轨道半径线..



查看此链接 http://www.mindstick.com/Forum/12982/Draw%20line%20 between%20div%20by%20click%20on%20div?isNotification=True [ ^ ]

推荐答案

添加DOM元素的最简单方法是使用jQuery。请参阅: http://api.jquery.com/category/manipulation/dom-insertion-outside [ ^ ]。



处理点击: http://api.jquery.com/click [ ^ ]。



如果您需要学习jQuery(强烈推荐),请参阅:

http:// en.wikipedia.org/wiki/JQuery [ ^ ],

http://jquery.com [ ^ ],

http:// learn .jquery.com [ ^ ],

http:// learn .jquery.com / using-jquery-core [ ^ ],

http://learn.jquery.com / about-jquery / how-jquery-works [ ^ ](从这里开始)。



请记住,jQuery在设计时考虑了兼容性。



-SA
The easiest way of adding DOM elements would be using jQuery. Please see: http://api.jquery.com/category/manipulation/dom-insertion-outside[^].

To handle a click: http://api.jquery.com/click[^].

If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[^],
http://jquery.com[^],
http://learn.jquery.com[^],
http://learn.jquery.com/using-jquery-core[^],
http://learn.jquery.com/about-jquery/how-jquery-works[^] (start from here).

Remember that jQuery is designed with compatibility in mind.

—SA


这篇关于通过点击div在div之间画线...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆