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

Javascript¶¯Ì¬Éú³ÉÏÂÀ­Áбí

ÓÃJavascriptʵÏÖ¸ù¾ÝÏÂÀ­ÁбícategoryµÄÑ¡Ôñ½á¹û£¬¸Ä±äÏÂÀ­Áбísub_categoryµÄÑ¡Ïî
<mce:script language="javascript" type="text/javascript">
<!--
function changeSubCategory() {
var sel_category = document.getElementById("category");
var sel_sub_category = document.getElementById("sub_category");
var len = sel_sub_category.length
for ( var i = 0; i < len; i++) {
sel_sub_category.remove(sel_sub_category.length - 1);
//Çå³ýÔ­ÓеÄoption
}
if (sel_category.value == "±¾¿Æ") {
var opt1 = document.createElement("option")
opt1.text = opt1.value = "±¾¿ÆÒ»Ä꼶"
sel_sub_category.add(opt1)
var opt2 = document.createElement("option")
opt2.text = opt2.value = "±¾¿Æ¶þÄ꼶"
sel_sub_category.add(opt2)
var opt3 = document.createElement("option")
opt3.text = opt3.value = "±¾¿ÆÈýÄ꼶"
sel_sub_category.add(opt3)
var opt4 = document.createElement("option")
opt4.text = opt4.value = "±¾¿ÆËÄÄ꼶"
sel_sub_category.add(opt4)
} else if (sel_category.value == "˶ʿ") {
var opt1 = document.createElement("option")
opt1.text = opt1.value = "˶ʿһÄ꼶"
sel_sub_category.add(opt1)
var opt2 = document.createElement("option")
opt2.text = opt2.value = "˶ʿ¶þÄ꼶"
sel_sub_category.add(opt2)
} else if (sel_category.value == "²©Ê¿") {
var opt1 = document.createElement("option")
opt1.text = opt1.value = "²©Ê¿Ò»Ä꼶"
sel_sub_category.add(opt1)
var opt2 = document.createElement("option")
opt2.text = opt2.value = "²©Ê¿¶þÄ꼶"
sel_sub_category.add(opt2)
}
}
// --></mce:script>


Ïà¹ØÎĵµ£º

javascriptÕýÔò±í´ïʽʵÏÖtrim()ÒÉ»ó

ÕýÔÚ¿´¡¡javascript¸ß¼¶³ÌÐòÉè¼Æ¡¡,ÆäÖйØÓÚ·Ö×éÀïÃæµÄÒ»¾ä´úÂë²»ÊÇÌ«Àí½â:
ͨ¹ýÅäºÏʹÓÃString¶ÔÏóµÄreplace()·½·¨¼°·´ÏòÒýÓ㬾ͿÉÒÔ¶¨Òå×Ô¼ºµÄtrim()·½·¨:
String.prototype.trim = function() {
var reExtraSpace = /^\s+(.*?)\s+$/;
return this.replace(reExtraSpace,"$1");
}
 
Ò»¿ªÊ¼ÔõôҲ²» ......

css,javascriptµÄÔ¤¼ÓÔØ

css,javascriptµÄÔ¤¼ÓÔØ
ΪÁËÌá¸ßÍøÕ¾µÄ¼ÓÔØËٶȣ¬ÓÐÒ»¸öºÜÖØÒªµÄÊֶξÍÊÇÔÚÓû§ä¯ÀÀ¹ý³ÌÖеÄÉÏÓÎÍøÕ¾×öÒ»¸öÎļþµÄÔ¤¼ÓÔØ¡£Ô¤¼ÓÔØÎļþÒ»°ãÓÐÁ½ÖÖ³£Óõķ½Ê½£ºxhrºÍ¶¯Ì¬²åÈë½ÚµãµÄ·½Ê½¡£¶¯Ì¬²åÈë½ÚµãÊÇ×îΪ¼òµ¥Ò²×îΪ¹ã·ºµÄÒ»ÖÖÒì²½¼ÓÔØ·½Ê½(ÀýÈçyuiµÄGetÄ£¿é)£¬È»ºóʹÓö¯Ì¬²åÈë½Úµã·½·¨¼ÓÔصÄÎļþ¶¼»áÔÚ¼ÓÔغóÁ¢¼´Ö´ÐУ¬ ......

css,javascriptµÄÔ¤¼ÓÔØ

ΪÁËÌá¸ßÍøÕ¾µÄ¼ÓÔØËٶȣ¬ÓÐÒ»¸öºÜÖØÒªµÄÊֶξÍÊÇÔÚÓû§ä¯ÀÀ¹ý³ÌÖеÄÉÏÓÎÍøÕ¾×öÒ»¸öÎļþµÄÔ¤¼ÓÔØ¡£Ô¤¼ÓÔØÎļþÒ»°ãÓÐÁ½ÖÖ³£Óõķ½Ê½£ºxhrºÍ¶¯Ì¬²åÈë½ÚµãµÄ·½Ê½¡£¶¯Ì¬²åÈë½ÚµãÊÇ×îΪ¼òµ¥Ò²×îΪ¹ã·ºµÄÒ»ÖÖÒì²½¼ÓÔØ·½Ê½(ÀýÈçyuiµÄGetÄ£¿é)£¬È»ºóʹÓö¯Ì¬²åÈë½Úµã·½·¨¼ÓÔصÄÎļþ¶¼»áÔÚ¼ÓÔغóÁ¢¼´Ö´ÐУ¬javascriptµÄÖ´ÐÐÒ»·½Ãæ»áÕ ......

asp.net¶¯Ì¬×¢²ájavascript×ܽá

Ò».ʹÓÃRegisterStartUpScript×¢²áÖ»Ö´ÐÐÒ»´ÎµÄjavascript
µÚ1²½(´´½¨²¢×¢²á²¢Ê¹ÓÃjavascript)£ºPage.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
//´´½¨JavaScript
string info = "<mce:script type="text/javascript"><!--alert('ÄãºÃ£¬ÎÒÊÇXXX£¡')// --></mce:scrip ......

javascriptÕýÔò±í´ïʽµÄ»ù±¾ÖªÊ¶


1 javascript ÕýÔò
¶ÔÏó´´½¨ ºÍÓ÷¨
ÉùÃ÷javascript ÕýÔò
±í´ïʽ
¸´ÖÆ´úÂë
´úÂëÈçÏÂ:

var reCat = new RegExp("cat");
ÄãÒ²¿ÉÒÔ
var reCat = /cat/; //Perl ·ç¸ñ £¨ÍƼö£©

2 ѧϰ×î³£ÓÃµÄ test exec match search replace split 6¸ö·½·¨
1£© test ¼ì²éÖ¸¶¨µÄ×Ö·û´®ÊÇ·ñ´æÔÚ
¸´ÖÆ´úÂë
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ