日本テレビ での JCGv44RS0
$(function(){
//$('#ngid').val($.cookie("ngid"));
$("#submit").click(function(){
//window.alert ($('#ngid').attr('value'));
var myDate= new Date();
var Y = myDate.getFullYear();
var M = myDate.getMonth() + 1;
var D = myDate.getDate();
var setDate = ""+Y+M+D;
// セット日をチェック
var str = $.cookie("ngid");
var str2 = $('#ngid').attr('value');
//window.alert (str);
if ( str === undefined || str.indexOf(setDate) == -1) {
//strにhogeを含む場合の処理
$.removeCookie("ngid");
$.cookie("ngid",setDate);
str = $.cookie("ngid");
}
// ngid重複チェック
if ( str.indexOf(str2) == -1) {
//strにhogeを含む場合の処理
$.removeCookie("ngid");
$.cookie("ngid",str+","+str2);
window.alert (str2 + " をNGユーザーに登録しました");
}else{
window.alert (str2 + " は既に登録済み");
}
//$.cookie("ngid",$('#ngid').attr('value'));
//location.href="img_test.html";
})
})
日本テレビ での JCGv44RS0