items.js

来自「这是基于jsp的相册管理系统。数据库是mysql」· JavaScript 代码 · 共 58 行

JS
58
字号
var div_to_fill = '';

var xmlRequest_items = "";
var album_id_to_fill ='';
function sendMessage_items(url)
{
   xmlRequest_items =  createXMLHttpRequest();
   xmlRequest_items.open("post",url);
   xmlRequest_items.onreadystatechange = apply_del_StateChange;
   xmlRequest_items.send(null);
}
function apply_del_StateChange()
{
  if (xmlRequest_items.readyState == 4)
   {
     if (xmlRequest_items.status == 200)
     {
        showPhotos(album_id_to_fill,div_to_fill);
     }
   }
}
function delPhoto(album_id,sPhotoId,div_name)
{
   div_to_fill = div_name;
   album_id_to_fill = album_id;
   var url = 'delPhoto.jsp?albumId='+album_id+'&photoId='+sPhotoId;
   sendMessage_items(url,album_id,div_name);
}

 var  xmlRequest_items_photo = '';
function sendMessage_items_photo(url)
{
      xmlRequest_items_photo = createXMLHttpRequest();
      xmlRequest_items_photo.open('post',url);
      xmlRequest_items_photo.onreadystatechange = apply_items_photo_StateChange;
      xmlRequest_items_photo.send(null);
      
}
function apply_items_photo_StateChange()
{
   if (xmlRequest_items_photo.readyState == 4)
   {
     if (xmlRequest_items_photo.status == 200)
     {
        document.getElementById(div_to_fill).innerHTML = xmlRequest_items_photo.responseText;
         rdl_Load();
     }
   }
}
function items_showPhoto_enter(sPhotoPath,sPhotoName,div_name)
{
   alert('in items_showPhoto_enter ' + sPhotoPath);
   div_to_fill = div_name;
   var url = 'img.jsp?photoPath='+sPhotoPath+'&photoName='+sPhotoName;
   sendMessage_items_photo(url);
   
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?