javascript ÅжÏÎļþÀàÐÍ
function checkfiletype()
{
var fileName = document.getElementById('<%=FilePath.ClientID%>').value;
if (Trim(fileName)=="")
{
alert("ÇëÑ¡ÔñÒªÉÏ´«µÄÎļþ£¡");
document.getElementById('<%=FilePath.ClientID%>').focus();
return false;
}
//ÉèÖÃÎļþÀàÐÍÊý×é
var extArray = new Array(".rar",".doc",".rtf",".xls");
//»ñÈ¡ÎļþÃû³Æ
while (fileName.indexOf("\\") != -1)
fileName = fileName.slice(fileName.indexOf("\\") + 1);
//»ñÈ¡ÎļþÀ©Õ¹Ãû
var ext = fileName.slice(fileName.indexOf(".")).toLowerCase();
//±éÀúÎļþÀàÐÍ
for (var i = 0; i < extArray.length; i++)
{
if (extArray[i] == ext)
{
return true;
}
}
alert("Ö»ÄÜÉÏ´«ÏÂÁÐÀàÐ͵ÄÎļþ: " + extArray.join(" "));
document.getElementById('<%=FilePath.ClientID%>').focus();
return false;
}
Ïà¹ØÎĵµ£º
withÓï¾ä
ÓÃÓÚÉèÖôúÂëÌØ¶¨¶ÔÏóµÄ×÷ÓÃÓò¡£
Àý£º
var sMessage = "hello world";
with(sMessage)
{
&nbs ......
label:statement
Àý£º
start:var iCount = 10;
±êÇ©¿ÉÒÔ±»ºóÀ´µÄbreakÓï¾ä»òcontinueÓï¾äÒýÓá£
Àý£º
var iNum=0;
outermost:
&n ......
ÎÒÃǶ¼ÖªµÀ£¬ajaxÄÜÌá¸ßÒ³ÃæÔØÈëµÄËٶȵÄÖ÷ÒªÔÒòÊÇͨ¹ýajax¼õÉÙÁËÖØ¸´Êý¾ÝµÄÔØÈë£¬ÕæÕý×öµ½°´Ðè»ñÈ¡£¬¼ÈÈ»Èç´Ë£¬ÎÒÃÇÔÚдajax³ÌÐòµÄʱºò²»·ÁËÍ·ðË͵½Î÷£¬ÔÚ¿Í»§¶ËÔÙ×öÒ»´Î»º´æ,½øÒ»²½Ìá¸ßÊý¾ÝÔØÈëËÙ¶È¡£ÄǾÍÊÇÔÚÔØÈëÊý¾ÝµÄͬʱ½«Êý¾Ý»º´æÔÚä¯ÀÀÆ÷ÄÚ´æÖУ¬Ò»µ©Êý¾Ý±»ÔØÈë£¬Ö»ÒªÒ³ÃæÎ´Ë¢Ð£¬¸ÃÊý¾Ý¾ÍÓÀÔ¶µÄ»º´æÔÚÄÚ´æÖУ¬µ±Ó ......
ÀûÓÃjsÀ´¶¯Ì¬´´½¨±í¸ñÓÐÁ½ÖÖ¸ñʽ£¬appendChild()ºÍinsertRow¡¢insertCell()¡£Á½ÖÖ·½Ê½Æäʵ²î²»¶à£¬µ«µÚÒ»ÖÖÓпÉÄÜÔÚIEÉÏÓÐÎÊÌ⣬ËùÒÔÍÆ¼ö´ó¼ÒʹÓõڶþÖÖÁË£¬Ö±½Ó˵°É¡£
1¡¢inserRow()ºÍinsertCell()º¯Êý
insertRow()º¯Êý¿ÉÒÔ´ø²ÎÊý£¬ÐÎʽÈçÏ£º
insertRow(index)£ºindex´Ó0¿ªÊ¼
Õâ¸öº¯Êý½«ÐÂÐÐÌí¼Óµ½indexµÄÄÇһР......
css,javascriptµÄÔ¤¼ÓÔØ
ΪÁËÌá¸ßÍøÕ¾µÄ¼ÓÔØËÙ¶È£¬ÓÐÒ»¸öºÜÖØÒªµÄÊֶξÍÊÇÔÚÓû§ä¯ÀÀ¹ý³ÌÖеÄÉÏÓÎÍøÕ¾×öÒ»¸öÎļþµÄÔ¤¼ÓÔØ¡£Ô¤¼ÓÔØÎļþÒ»°ãÓÐÁ½ÖÖ³£Óõķ½Ê½£ºxhrºÍ¶¯Ì¬²åÈë½ÚµãµÄ·½Ê½¡£¶¯Ì¬²åÈë½ÚµãÊÇ×îΪ¼òµ¥Ò²×îΪ¹ã·ºµÄÒ»ÖÖÒì²½¼ÓÔØ·½Ê½(ÀýÈçyuiµÄGetÄ£¿é)£¬È»ºóʹÓö¯Ì¬²åÈë½Úµã·½·¨¼ÓÔØµÄÎļþ¶¼»áÔÚ¼ÓÔØºóÁ¢¼´Ö´ÐУ¬ ......