Helping others debug a piece of code. After debugging for a while, I found that there are many problems and my head is spinning. Please help me.
<!DOCTYPE html><html><head><SCRIPT TYPE="text/javascript" SRC="jquery.js"></SCRIPT></head><body><a href="" title="">Long press</a><p>长时间点击2秒后我会变颜色</p><script type=text/javascript> function down(){ var timeout = window.setTimeout(function() {$("p").css("color","yellow");},1000);});function up(){ $("p").css("color","black");});$("a").addEventListener("mousedown",down,false); $("a").addEventListener("mouseup",up,false); </script> </body></html>