﻿function infoFavorite(infoTitle) {
    var pageUrl = "/InfoFavoriteAdd.aspx";
    var postStr = "infoTitle=" + infoTitle + "&infoUrl=" + document.URL;
    var ajaxRequest = new Request({
        url: pageUrl,
        method: 'post',
        data: postStr,
        async: false,
        encoding: 'utf-8',
        onSuccess: function(txt) {
            alert(txt);
        },
        onFailure: function() {
            alert("收藏失败！");
        }
    }).send();
}

function infoFavoriteAsp(infoTitle,infoUrl) {
    var pageUrl = "/Favorite.asp";
    var postStr = "infoTitle=" + infoTitle + "&infoUrl=" + infoUrl;
    var ajaxRequest = new Request({
        url: pageUrl,
        method: 'post',
        data: postStr,
        async: false,
        encoding: 'utf-8',
        onSuccess: function(txt) {
            alert(txt);
        },
        onFailure: function() {
            alert("收藏失败！");
        }
    }).send();
}