JavaScript´úÂë½âÊÍ£¨¹ØÓÚÒ»¸öÏÂÀ²Ëµ¥µÄ£©
stuHover = function() {
var cssRule;
var newSelector;
for (var i = 0; i < document.styleSheets.length; i++)
for (var x = 0; x < document.styleSheets[i].rules.length ; x++)
{
cssRule = document.styleSheets[i].rules[x];
if (cssRule.selectorText.indexOf("LI:hover") != -1)
{
newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover");
document.styleSheets[i].addRule(newSelector , cssRule.style.cssText);
}
}
var getElm = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i <getElm.length; i++) {
getElm[i].onmouseover=function() {
this.className+=" iehover";
}
getElm[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" iehover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", stuHover);
ÓÐÉ«²ÊµÄJavaScriptº¯Êý°ïæÏêϸ½âÊÍÒ»ÏÂ
²éÕÒLI:hoverÑùʽ£¬ÈôÕÒµ½ÔòÌæ»»ÎªLI.iehover
¶¥1Â¥ ˵µÄ¶Ô¡£
JScript code:
function a() {
alert("頂");
}
ѧϰ¡£
²»ºÃÒâ˼£¬ºÃ¾ÃûµÇ¼csdn¡£Õâ¾Í¸ø·Ö¡£
Ïà¹ØÎÊ´ð£º
ÈçºÎʵÏÖµ±Êó±êÐüÍ£¿Ø¼þÉÏʱ£¬³öÏָÿؼþµÄβ²¿ÏÔʾ¶ÔÓ¦µÄ²ã£¬Êó±êÒÆ¶¯µ½¸Ã²ãÉϽøÐÐÏàÓ¦µÄ²Ù×÷£¬µ±Êó±êÒÆ³ýʱ£¨²»ÔڿؼþÉÏÒ²²»ÔÚ²ãÉÏ£©²ãÒþ²Ø£¬
http://topic.csdn.net/u/20090830/23/5e5ded07-7216-46c2-9712- ......
ÿÖÜһ̸:JavaScript¼òµ¥×ܽá
±±¾© ÖÐÈí¹ú¼Êµç×ÓÕþÎñ²¿ Jeff Chi Ô´´£¬×ªÔØÇë×¢Ã÷±¾ÈËÔÖ·Á´½Ó
1¡¢×öjsµÚÒ»ÌõҪעÒâµÄ¾ÍÊÇÒªÖªµÀ×Ô¼ºËùÃæÁÙµÄÌôÕ½
a.ä¯ÀÀÆ÷¾³£»á±³ÀëÏÖÓеĹ淶±ê×¼£¬¾ÍÊÇ˵Óкܶàä¯ÀÀÆ÷רÓеÄj ......
void CWEHelperDlg::OnOK(){
CString code;
//µ÷ÓÃVBSCRIPT£¬Äܵ¯³öÏûÏ¢¿ò,Ò²ÄÜÕýÈ··µ»Ø hello
code = "function main()\r\n\tMsgBox \"ok\"\r\n\tmain=\"hello\"\r\nend functio ......
ÇëÎÊÔõôдһ¸öfunction £¬·µ»ØN¸ö0-9µÄËæ»úÊý£¬ÕâÐ©Ëæ»úÊý·ûºÏ¸ßÊý·Ö²¼(¾ùÔÈ·Ö²¼Ëæ»úÊý)£¬ÎÞÄα¾È˸ßÊý±È½Ï²î£¬ÌØÀ´´ËÇë½Ì£¡²»¶®µÃÇë°ïæ°ï¶¥Ò»Ï£¬Íò·Ö¸Ðл£¡£¡
ÄãÒªÇóÒ»¸ö·µ»ØÖ¸¶¨ÔªËظöÊýµÄÊý×éµÄËæ»úÊýº¯Êý?
......
·¿´ÒÔǰµÄÌû×Ó£¬ÓÃstruts1¿ò¼Ü£¬¿ÉÒÔд³Éalert£¨<bean:message key="name.required"/>£©£»
struts2ÀïûÓÐBean±êÇ©ÁË£¬ÓÚÊdz¢ÊÔÓÃalert(<s:text name="name.required">);
½Å±¾±¨´ ......