当线路填满线路支架后,我需要执行一些操作。例如:当您单击“circle1”并且线路运行到“并且我需要收到警报”时。
http://jsfiddle.net/fresa150/8gNPA/
尝试过:
if ($('#line').width() = 100) {
alert('something should happen with button');
}
我做错了什么以及如何解决?
最佳答案
= assignment
== means comparison without strict type checking
=== means comparison with strict type checking
a = b
在 JavaScript 中始终返回 true,因此您的 if 条件将始终运行
关于javascript - 另一个 Action 结束后执行 Action ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24020345/