Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScript»ñµÃÉÏÒ»Ò³µØÖ·

ÔÚJavaScriptÖÐÀûÓÃdocument.referrer¿ÉÒÔ»ñµÃÌøתǰÉÏÒ»Ò³µÄµØÖ·,ÆäʵÔÚÖîÈçAsp,PHPµÈÓïÑÔÖж¼¿ÉÒÔ»ñµÃÕâ¸ö²ÎÊý,Ö»²»¹ýд·¨²»Í¬,È»ºó¿ÉÒÔÅжÏÊÇÄÄÀïÀ´µÄÇëÇó´Ó¶ø×öһЩ´¦Àí.µ«ÊÇJSÖеÄdocument.referreÖ»ÄÜ»ñµÃ<a>±êÇ©´«¹ýÀ´µÄ²ÎÊý.¿´´úÂë
a.html
<html>
<head>
<title>²âÊÔ</title>
<mce:script type="text/javascript"><!--
function test(){
window.location.href = "b.html";
}

// --></mce:script>
</head>
<body>
<input type="button" onclick="test()" value="²âÊÔÌøת">
<a href="b.html" mce_href="b.html">µã»÷ÎÒÌøת</a>
</body>
</html>
b.html
<html>
<head>
<title>²âÊÔ</title>
<mce:script type="text/javascript" language="javascript"><!--
alert(document.referrer);

// --></mce:script>
</head>
<body>

</body>
</html>
Õâ¶Î´úÂë²»ÄÜÆÕͨµÄÔÚ±¾µØÖ´ÐÐ,ÕâÑù»áʲô¶¼»ñµÃ²»µ½µÄ,Äõ½TomcatÏÂ,¾Í¿ÉÒÔ¿´µ½´«¹ýÀ´µÄÖµÁË,ÓÐÐËȤÑо¿µÄ¿ÉÒÔÊÔÊÔ.ÕâÖÖ´¦ÀíÏÖÔÚMSÊDz»ÄÜαÔìµÄ,ÎÒGoogleÁËÒ»ÏÂ,»¹ÕæûÓÐÕÒµ½Î±ÔìµÄ·½·¨,µÈÓлú»áÔںúÃÑо¿Ò»ÏÂ.


Ïà¹ØÎĵµ£º

JavaScript »ñÈ¡¶ÔÏóµÄ¸ß¶ÈºÍ¿í¶ÈÏêϸ˵Ã÷

scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐÄ¿Ç°¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......

´«ÖDz¥¿ÍJavaѧϰ JavaScript¼ÓÇ¿

ÎÒ½ñÌìѧϰÁËÙ¡ÀÏʦ½²µÄJavaScript½âÎöDomÎĵµµÄ֪ʶ£º
Ò»¡¢        ½Úµã·ÖΪ3ÖÖÀàÐÍ£¬ÔªËؽڵ㣬ÊôÐԽڵ㣬Îı¾½Úµã
¶þ¡¢        ²éÕҽڵ㣺
l       js´úÂë²»ÄÜдÔÚbodyÔªËصÄÇ°Ã棬js ´úÂëдÔÚ <head> ½ ......

JavascriptÈëÃÅ£¨¿É¹©CSS/JS/XSS³õѧÕ߲ο¼£©

JavaScript×÷ÓÃС½á£º
1 ´´½¨½Å±¾¿é 
1: <script language=”JavaScript”> 
2: JavaScript code goes here 
3: </script>  
2 Òþ²Ø½Å±¾´úÂë 
1: <script language=”JavaScript”> 
2: <!-- 
3: document.write(“ ......

Javascript »ñÈ¡Ò³Ãæ¸ß¶È£¨¶àÖÖä¯ÀÀÆ÷£©

¹ØÓÚ»ñÈ¡¸÷ÖÖä¯ÀÀÆ÷¿É¼û´°¿Ú´óСµÄÒ»µãµãÑо¿¡£
ÔÚÎÒ±¾µØ²âÊÔµ±ÖУº
ÔÚIE¡¢FireFox¡¢Opera϶¼¿ÉÒÔʹÓÃ
document.body.clientWidth
document.body.clientHeight
¼´¿É»ñµÃ£¬ºÜ¼òµ¥£¬ºÜ·½±ã¡£
¶øÔÚ¹«Ë¾ÏîÄ¿µ±ÖУº
OperaÈÔȻʹÓÃ
document.body.clientWidth
document.body.clientHeight
¿ÉÊÇIEºÍFireFoxÔòʹÓÃ
docu ......

JavaScript µ÷Óúǫ́ʼþºÍ·½·¨

1¡¢ºǫ́·½·¨£º
protected string CsharpVoid(string strCC)
{
strCC = "http://" + strCC;
return strCC;
}
2¡¢Ç°Ì¨Ò³ÃæJavaScript·½·¨£º
<script language="javascript" type="text/javascript">
var v = "www.baidu.com";
var s = '<%=CsharpVoid("'+v+'")%>';
document.write(s);
< ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ