刷新页面所有保存的Cookie显示在我使用的表中。 [英] After Refreshing Page All Saved Cookie Display In Table Which I Use.
本文介绍了刷新页面所有保存的Cookie显示在我使用的表中。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$("[id$='Show']").on("click", function () {
try {
var id = $(this).attr('id');
var symbol;
var context;
if (id.toString().indexOf('Bullish', 0) > 0) {
symbol = $("#drpBullishSymbol option:selected").text();
context = $("#AA");
}
if (id.toString().indexOf('Bearish', 0) > 0) {
symbol = $("#drpBearishSymbol option:selected").text();
context = $("#BA");
}
if (symbol.toString().length > 0) {
$("tr", context).each(function () {
if ($('td:eq(0)', this).text() !== symbol) {
$(this).hide();
//$(this).css('visibility', 'collapse');
} else {
$("#AA").before($(this).show());
WriteCookie(symbol);
}
});
}
} catch (ex) {
alert("While filtering details : " + ex);
}
});
})
function WriteCookie(symbol) {
document.cookie = symbol ;
alert("Cookie Name=" + symbol);
}
这是我的javascript用于点击显示按钮它添加cookie并显示哪个是在下拉列表中选择。我使用这个函数写cookie但现在我想要当我刷新页面保存的cookie显示在表格行选择之前所以在javascript中有一些信息或解决方案请帮助。
This is my javascript which use to click on show button it add cookie and show which is select in dropdownlist. I used this function for write cookie but now i want that when i refresh page saved cookie display on table row which is select previous so having some information or solution in javascript please help.
推荐答案
( [id
("[id
='Show']).on( click,function(){
尝试 {
var id =
='Show']").on("click", function () { try { var id =
( this )。attr(' id');
var 符号;
var context;
if (id.toString()。indexOf(' 布利sh', 0 )> 0 ){
symbol =
(this).attr('id'); var symbol; var context; if (id.toString().indexOf('Bullish', 0) > 0) { symbol =
这篇关于刷新页面所有保存的Cookie显示在我使用的表中。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文