[JavaScript] Cractived Memory

xiaoxiao2021-03-06  37

When writing JS, I encountered a problem: Document.Onmousedown = TestMouse; (executable) and Document.Onmousedown = TestMouse () TestMouse are a function. After finding the information, I understand. In fact, Document.onMouseDown = TestMouse; equivalent to Document.onMouseDown = function () {TestMouse ()}; can write: Document.Onmousedown = function () {TestMouse ()}; with brackets: execution function, return execution The result is: return function itself (can be seen as a "pointer") can be refer to here: http://community.9cbs.net/Expert/topic/3667/3667592.xml? Temp = .4690363 ==== ============= Move open new window: var x = 0; function movewindow () {x = x 1; if (win! = Null && win.opener! = Null) {Win . ga = self; win.moveto (x, 100); Window.SetTimeout ("MoveWindow ()", 1);}}

转载请注明原文地址:https://www.9cbs.com/read-65955.html

New Post(0)