删除按钮事件的操作并进行另一个事件 [英] Delete the action of a button event and make another event
问题描述
大家好。
我有两个绘制图形的按钮。
第一个绘制带有一些值的图形,第二个绘制带有其他值的图形。我的HTML页面上的相同位置绘制了两个图形。
问题是,如果我连续按两个按钮
而且我不刷新,图表会覆盖页面。
$(#buttonA)。click(function(){
deseneazaGrafic (jsonData.Antena3);
});
和第二个按钮
$(#buttonP)。click(function(){
deseneazaGrafic(jsonData.ProTV);
});
非常感谢!
(#buttonA)。click(function(){
deseneazaGrafic(jsonData.Antena3);
});
和第二个按钮
( #buttonP)。单击(函数(){
deseneazaGrafic(jsonData.ProTV);
});
非常感谢!
使用Ajax创建元素。
将图形加载到中 - 因为它是AJAX它将替换现有内容
Hello everyone .
I have two buttons that draw a graph.
The first one draws a graph with some values and the second one draws a graphic with other values.Both graphs are drawn in the same location on my HTML page.
The problem is that the graphs overwrites if i press the both buttons
consecutively and i don't refresh the page.
$("#buttonA").click(function(){
deseneazaGrafic(jsonData.Antena3);
});
and the second button
$("#buttonP").click(function(){
deseneazaGrafic(jsonData.ProTV);
});
Thanks a lot !解决方案("#buttonA").click(function(){
deseneazaGrafic(jsonData.Antena3);
});
and the second button
("#buttonP").click(function(){
deseneazaGrafic(jsonData.ProTV);
});
Thanks a lot !
Use Ajax to create the element.
Load the graph into a- since it's AJAX it will replace the existing content.
这篇关于删除按钮事件的操作并进行另一个事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文