Javascript ÈçºÎʵÏÖ¶ÔÏóµÄÍ϶¯£¿
½â¾ö˼·
Õâ¸öЧ¹û²¢²»Ëã³£¼û£¬Í¨³£ÓÃÓÚÓÎÏ·»ò¸öÈËÕ¾µãÖС£ÒòΪÍÏÒ·ÊÇ¿¿Êó±êÀ´²Ù×÷µÄ£¬ËùÒÔ¶ÔÊó±êµÄλÖõIJ¶»ñÊÇÎÊÌâµÄÖص㣬Ȼºó²ÅÊǸù¾ÝÊó±êµÄλÖÃÉèÖòãµÄλÖá£
¾ßÌå²½Ö裺
1.ÔÚ¶ÔÏó(²ã)ÉÏ°´ÏÂÊó±êʱ£¬ÏȲ¶»ñµ½ÐèÒªÍÏÒ·µÄ¶ÔÏó£¬È»ºó»ñÈ¡»òÉèÖøöÔÏóµÄÏà¹ØÊôÐÔ¡£
obj=event.srcElement
obj.setCapture()
z=obj.style.zIndex
obj.style.zIndex=100
x=event.offsetX
y=event.offsetY
down=true
2.¿ªÊ¼ÍÏҷʱ£¬²¶»ñÊó±êµ±Ç°Î»Ö㬲¢¸ù¾Ý¸ÃÊýÖµÉèÖñ»ÍÏÒ·¶ÔÏóµÄλÖá£
obj.style.posLeft=document.body.scrollLeft+event.x-x
obj.style.posTop=document.body.scrollTop+event.y-y
3.ÍÏÒ·ÍêËÉ¿ªÊó±êºó£¬ÖØÉè±êÖ¾ down £¬»¹Ô¶ÔÏóµÄ z-index²¢ÊͷŶÔËüµÄÊó±ê²¶×½¡£
down=false
obj.style.zIndex=z
obj.releaseCapture()
4.ÍêÕû´úÂë¡£
<mce:script type="text/javascript"><!--
var x,y,z,down=false,obj
function init(){
obj=event.srcElement //ʼþ´¥·¢¶ÔÏó
obj.setCapture() //ÉèÖÃÊôÓÚµ±Ç°¶ÔÏóµÄÊó±ê²¶×½
z=obj.style.zIndex //»ñÈ¡¶ÔÏóµÄzÖá×ø±êÖµ
//ÉèÖöÔÏóµÄzÖá×ø±êֵΪ100£¬È·±£µ±Ç°²ãÏÔʾÔÚ×îÇ°Ãæ
obj.style.zIndex=100
x=event.offsetX //»ñÈ¡Êó±êÖ¸ÕëλÖÃÏà¶ÔÓÚ´¥·¢Ê¼þµÄ¶ÔÏóµÄX×ø±ê
y=event.offsetY //»ñÈ¡Êó±êÖ¸ÕëλÖÃÏà¶ÔÓÚ´¥·¢Ê¼þµÄ¶ÔÏóµÄY×ø±ê
down=true //²¼¶ûÖµ£¬ÅжÏÊó±êÊÇ·ñÒÑ°´Ï£¬trueΪ°´Ï£¬falseΪδ°´ÏÂ
}
function moveit(){
//ÅжÏÊó±êÒѱ»°´ÏÂÇÒonmouseoverºÍonmousedownʼþ·¢ÉúÔÚͬһ¶ÔÏóÉÏ
if(down&&event.srcElement==obj){
with(obj.style){
/**//*ÉèÖöÔÏóµÄX×ø±êֵΪÎĵµÔÚXÖá·½ÏòÉϵĹö¶¯¾àÀë¼ÓÉϵ±Ç°Êó±êÖ¸ÕëÏ൱ÓÚÎĵµ¶ÔÏóµÄX×ø±êÖµ¼õÊó±ê°´ÏÂʱָÕëλÖÃÏà¶ÔÓÚ´¥·¢Ê¼þµÄ¶ÔÏóµÄX×ø±ê*/
posLeft=document.body.scrollLeft+event.x-x
/**//*ÉèÖöÔÏóµÄY×ø±êֵΪÎĵµÔÚYÖá·½ÏòÉϵĹö¶¯¾àÀë¼ÓÉϵ±Ç°Êó±êÖ¸ÕëÏ൱ÓÚÎĵµ¶ÔÏóµÄY×ø±êÖµ¼õÊó±ê°´ÏÂʱָÕëλÖÃÏà¶ÔÓÚ´¥·¢Ê¼þµÄ¶ÔÏóµÄY×ø±ê*/
posTop=document.body.scrollTop+event.y-y
}
}
}
function stopdrag(){
//onmouseupʼþ´¥·¢Ê±ËµÃ÷Êó±êÒѾËÉ¿ª£¬ËùÒÔÉèÖÃdown±äÁ¿ÖµÎªfalse
down=false
obj.style.zIndex=z /
Ïà¹ØÎĵµ£º
µÚ9ÕÂ
´úÂë·ç¸ñ
¼ÆËã»ú³ÌÐòÊÇÈËÀàÖÆÔì³öÀ´µÄ×
ÔÓµÄÊÂÎï¡£³ÌÐòͨ³£Óɺܶಿ·Ö×é³É£¬±íÏÖΪº¯Êý¡¢Óï¾äºÍ±í´ïʽ£¬ËüÃDZØÐë׼ȷÎÞÎóµØ°´ÕÕ˳ÐòÅÅÁС£×îÖյĽá¹û¼¸ºõ¶¼ºÍʵÏÖËüµÄ³ÌÐòûÓÐʲôÏàËÆÖ®´¦¡£ÔÚÈí
¼þµÄ²úÆ·ÉúÃüÖÜÆÚÖУ¬Í¨³£ËüÃǶ¼»á±»Ð޸ġ£°ÑÒ»¸öÕýÈ·µÄ³ÌÐòת»¯ÎªÁíÒ»¸öͬÑùÕýÈ·µ«·ç¸ñ²»Í¬µÄ³ÌÐò£¬ÊÇ ......
http://blog.csdn.net/mouyong/archive/2010/01/25/5252558.aspx
µÚ6Õ Êý×é
Êý×éÊÇÒ»¶ÎÏßÐÔ·ÖÅäµÄÄڴ棬Ëüͨ¹ýÕûÊýÈ¥¼ÆËãÆ«ÒƲ¢·ÃÎÊÆäÖеÄÔªËØ¡£Êý×é¿ÉÒÔÊǺܿìµÄÊý¾Ý½á¹¹¡£²»ÐÒµÄÊÇ£¬JavaScriptµÄÊý×é²»ÊÇÕâÑùµÄ¡£ËüÌṩÁËÒ»ÖÖÓµÓÐÀàËÆÊý×éÌØÐԵĶÔÏó¡£Ëü°ÑÊý×éµÄϱêת±ä³É×Ö·û´®£¬ÓÃÆä×÷ΪÊôÐÔ¡£ËüÃ÷ÏԵر ......
function testExe(entityId, wfId) {
var id = crmForm.ObjectId;
var xml = "" +
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http:/ ......
ÔÎÄÁ´½Ó£ºJavaScript: Its Not Just for Browsers Any More
Node.jsÊÇÒ»Ì×ÓÃÀ´±àд¸ßÐÔÄÜÍøÂç·þÎñÆ÷µÄJavaScript¹¤¾ß°ü£¬Ò»ÏµÁеı仯ÓÉ´Ë¿ªÊ¼¡£
Ò²ÐíÄ㻹²»ÖªµÀ£¬JavaScriptÏÖÔÚÒѾ³ÉÁËÒ»Ãſɱàд³öЧÂʼ«¸ßµÄ¡¢¿ÉÓÃÓÚ¿ª·¢²úÆ·¼¶web·þÎñÆ÷µÄ³öÉ«ÓïÑÔ¡£Æð³õÎÒÒ²²»ÏàÐÅ£¬µ«2009 ÄêÆô¶¯µÄÁ½¸öÏîÄ¿ÈÃÕâ³ÉΪ¿ÉÄÜ£ºCommonJSº ......
1. Êý¾ÝÀàÐÍ
javascriptÖаüº¬6ÖÖÊý¾ÝÀàÐÍ£ºundefined¡¢null¡¢string¡¢number¡¢booleanºÍobject¡£ÆäÖУ¬Ç°5
ÖÖÊÇÔʼÊý¾ÝÀàÐÍ£¬objectÊǶÔÏóÀàÐÍ¡£
objectÀàÐÍÖаüÀ¨Object¡¢Function¡¢String¡¢Number¡¢Boolean¡¢Array¡¢Regexp¡¢Date¡¢
Globel¡¢Math¡¢Error£¬ÒÔ¼°ËÞÖ÷»·¾³ÌṩµÄobjectÀàÐÍ¡£
2. ÀàÐÍÅжÏ
ͨ³£ÔÚjav ......