JavaScript»ñÈ¡urlºó׺ - Web ¿ª·¢ / JavaScript
ÎÒÏÖÔÚÓÖurl
http://www.xxx.com/aaa.html?dne=hiejs&jco=snncl
http://www.xxx.com/aaa.do?dne=hiejs&jco=snncl
http://www.xxx.com/aaa.action?dne=hiejs&jco=snncl
ÇëÎÊÔõôȥµÄurlµÄºó׺
html do action
substr()
JScript code:
var s="http://www.xxx.com/aaa.html?dne=hiejs&jco=snncl";
var postfix=s.split('?')[1]
alert(postfix)
Õâ¸ö°Ù¶ÈÒ»ÏÂÌ«¶àÁË¡£¡£¡£
hookee¸ç£¬°ïæ¿´¿´ÎÒµÄÎÊÌ⣬
ÓÃ
JScript code:
function div_hover(){
$("div").hover(
function(e){
$(this).addClass("hover");
event.cancelBubble=true;
},
function(e){
$(this).removeClass("hover");
event.cancelBubble=true;
}
);
}
»ò
function div_hover(){
$("div").hover(
function(e){
e.stopPropagation();
$(this).addClass("hover");
},
function(e){
e.stopPropagation();
$(this).removeClass("hover");
}
);
}
¶¼²»ÐÐ
jquery hoverÊÂ
Ïà¹ØÎÊ´ð£º
ÎÒÏëÎÊÒ»ÏÂÈçºÎÔÚ»ðºüÖйرգ¬·Ç½Å±¾´ò¿ªµÄÒ³Ã棬ºÃÏñwindow.close()²»¹ÜÓÃO(¡É_¡É)O~£¬
°Ù¶Èһϣ¬×Ô¼ºÊÔÊÔ
<script language="javascript" type="text/javascript">
& ......
ÎÒѧµÄÊÇC++,¶ÔÓÚJava²»ÊǺÜÁ˽⡣×î½ü¿´ÁËJava·½ÃæµÄÊ飬¶ÔÓÚһЩ¸ÅÄîÓÐÁ˳õ²½Á˽⣬ϣÍû´ó¼ÒºÍÎÒÁÄÁÄ£¬Ì¸Ì¸Java £¬JSP JavaScriptÕ⼸¸ö¸ÅÄî¡£
1. javascriptºÍCSS, HTMLÒ»Æ𽫻ᷢË͸øä¯ÀÀÆ÷½øÐÐÖ´ÐУ¬×îÖÕ½«Ò³Ã ......
<%
function getName(num)
......
end function
%>
<script>
var num=1;
var xx=<%=getName(num)%>
</script>
ÈçºÎ²ÅÄÜÔÚjava ......
ËÄܸøÎÒ½²Ò»ÏÂÔÚjavascriptÖÐidºÍnameÓÐʲôÑùÇø±ð£¿
Ò»¸öÒ³ÃæÖÐ id×îºÃÖ»ÓÐÒ»¸ö ÒòΪ javascript ÓÐ getElementById("id")Ö®ÀຯÊý
name ¿ÉÒÔÓжà¸ö ³£ÓÃÔÚÌá½»ÇëÇóÊ·þÎñÆ÷¶Ë»ñÈ¡
Ò»¸öÔªËØÖÐ×îºÃÉè ......
ÍøÉÏÕÒµ½ÒÔÏÂ×ÊÁÏ
activexÀ´²Ù×÷javascriptº¯Êý¡£
ÎÒÃÇÔÚÍøÒ³ÖмÓÈëÒ»¶Îjavascript´úÂ룺
function Test(){
alert("test")
}
ÔÚact ......