Notice: Undefined index: wjs_cookie
w执行顺序。
ok
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head> <body> <form action="" method="post" id="amz_reviews" style="display: inline;">
<button type="submit" name="type"
value="amz_reviews" <?php if (!isset($_COOKIE['wjs_cookie']) || (isset($_COOKIE['wjs_cookie']) && $_COOKIE['wjs_cookie'] == 'amz_reviews')) echo 'style=" background-color:red;" '; ?>
onclick="w('amz_reviews')">差评
</button>
</form> <form action="" method="post" id="amz_similar_sellers" style="display: inline;">
<button type="submit"
name="type" <?php if (isset($_COOKIE['wjs_cookie']) && $_COOKIE['wjs_cookie'] == 'amz_similar_sellers') echo 'style=" background-color:red;" '; ?>
value="amz_similar_sellers"
onclick="w('amz_similar_sellers')">跟卖
</button>
</form> <form action="" method="post" id="amz_listing" style="display: inline;">
<button type="submit"
name="type" <?php if (isset($_COOKIE['wjs_cookie']) && $_COOKIE['wjs_cookie'] == 'amz_listing') echo 'style=" background-color:red;" '; ?>
value="amz_listing"
onclick="w('amz_listing')">评分、类目变化
</button>
</form>
</body>
</html>
<script>
document.cookie = 'wjs_cookie=' + 'amz_reviews'; function w(id) {
document.cookie = 'wjs_cookie=' + id;
document.getElementById(id).submit();
} console.log(document.cookie);
</script>
ok
<script>
document.cookie = 'wjs_cookie=' + 'amz_reviews'; function w(id) {
document.cookie = 'wjs_cookie=' + id;
document.getElementById(id).submit();
} console.log(document.cookie);
</script>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head> <body> <form action="" method="post" id="amz_reviews" style="display: inline;">
<button type="submit" name="type"
value="amz_reviews" <?php if (!isset($_COOKIE['wjs_cookie']) || (isset($_COOKIE['wjs_cookie']) && $_COOKIE['wjs_cookie'] == 'amz_reviews')) echo 'style=" background-color:red;" '; ?>
onclick="w('amz_reviews')">差评
</button>
</form> <form action="" method="post" id="amz_similar_sellers" style="display: inline;">
<button type="submit"
name="type" <?php if (isset($_COOKIE['wjs_cookie']) && $_COOKIE['wjs_cookie'] == 'amz_similar_sellers') echo 'style=" background-color:red;" '; ?>
value="amz_similar_sellers"
onclick="w('amz_similar_sellers')">跟卖
</button>
</form> <form action="" method="post" id="amz_listing" style="display: inline;">
<button type="submit"
name="type" <?php if (isset($_COOKIE['wjs_cookie']) && $_COOKIE['wjs_cookie'] == 'amz_listing') echo 'style=" background-color:red;" '; ?>
value="amz_listing"
onclick="w('amz_listing')">评分、类目变化
</button>
</form>
</body>
</html>
Notice: Undefined index: wjs_cookie
<script>
document.cookie = 'wjs_cookie=' + 'amz_reviews'; function w(id) {
document.cookie = 'wjs_cookie=' + id;
document.getElementById(id).submit();
} console.log(document.cookie);
</script>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head> <body> <form action="" method="post" id="amz_reviews" style="display: inline;">
<button type="submit" name="type"
value="amz_reviews" <?php if ($_COOKIE['wjs_cookie'] == 'amz_reviews') echo 'style=" background-color:red;" '; ?>
onclick="w('amz_reviews')">差评
</button>
</form> <form action="" method="post" id="amz_similar_sellers" style="display: inline;">
<button type="submit"
name="type" <?php if ($_COOKIE['wjs_cookie'] == 'amz_similar_sellers') echo 'style=" background-color:red;" '; ?>
value="amz_similar_sellers"
onclick="w('amz_similar_sellers')">跟卖
</button>
</form> <form action="" method="post" id="amz_listing" style="display: inline;">
<button type="submit"
name="type" <?php if ($_COOKIE['wjs_cookie'] == 'amz_listing') echo 'style=" background-color:red;" '; ?>
value="amz_listing"
onclick="w('amz_listing')">评分、类目变化
</button>
</form>
</body>
</html>
Notice: Undefined index: wjs_cookie
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<script>
document.cookie = 'wjs_cookie=' + 'amz_reviews'; function w(id) {
document.cookie = 'wjs_cookie=' + id;
document.getElementById(id).submit();
} console.log(document.cookie);
</script>
<body> <form action="" method="post" id="amz_reviews" style="display: inline;">
<button type="submit" name="type"
value="amz_reviews" <?php if ($_COOKIE['wjs_cookie'] == 'amz_reviews') echo 'style=" background-color:red;" '; ?>
onclick="w('amz_reviews')">差评
</button>
</form> <form action="" method="post" id="amz_similar_sellers" style="display: inline;">
<button type="submit"
name="type" <?php if ($_COOKIE['wjs_cookie'] == 'amz_similar_sellers') echo 'style=" background-color:red;" '; ?>
value="amz_similar_sellers"
onclick="w('amz_similar_sellers')">跟卖
</button>
</form> <form action="" method="post" id="amz_listing" style="display: inline;">
<button type="submit"
name="type" <?php if ($_COOKIE['wjs_cookie'] == 'amz_listing') echo 'style=" background-color:red;" '; ?>
value="amz_listing"
onclick="w('amz_listing')">评分、类目变化
</button>
</form>
</body>
</html>
Notice: Undefined index: wjs_cookie
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<script>
document.cookie = 'wjs_cookie=' + 'amz_reviews'; function w(id) {
document.cookie = 'wjs_cookie=' + id;
document.getElementById(id).submit();
} console.log(document.cookie);
</script>
<form action="" method="post" id="amz_reviews" style="display: inline;">
<button type="submit" name="type"
value="amz_reviews" <?php if ($_COOKIE['wjs_cookie'] == 'amz_reviews') echo 'style=" background-color:red;" '; ?>
onclick="w('amz_reviews')">差评
</button>
</form> <form action="" method="post" id="amz_similar_sellers" style="display: inline;">
<button type="submit"
name="type" <?php if ($_COOKIE['wjs_cookie'] == 'amz_similar_sellers') echo 'style=" background-color:red;" '; ?>
value="amz_similar_sellers"
onclick="w('amz_similar_sellers')">跟卖
</button>
</form> <form action="" method="post" id="amz_listing" style="display: inline;">
<button type="submit"
name="type" <?php if ($_COOKIE['wjs_cookie'] == 'amz_listing') echo 'style=" background-color:red;" '; ?>
value="amz_listing"
onclick="w('amz_listing')">评分、类目变化
</button>
</form>
</body>
</html>
Notice: Undefined index: wjs_cookie的更多相关文章
- PHP中出现Notice: Undefined index的三种解决办法
前一段做的一个PHP程序在服务器运行正常,被别人拿到本机测试的时候总是出现“Notice: Undefined index:”这样的警告,这只是一个因为PHP版本不同而产生的警告(NOTICE或者WA ...
- Notice: Undefined index: user in D:\phpStudy\WWW\js\ls\lsmc\php\add.php on line 9
原文:Notice: Undefined index: user in D:\phpStudy\WWW\js\ls\lsmc\php\add.php on line 9 (初用数据库(mysql)做用 ...
- PHP Notice: Undefined index:解决方法
PHP Notice: Undefined index:解决方法 PHP Notice: Undefined index: 解决方法 <pre> if (empty(swoole_get ...
- php提示Notice: Undefined index解决方法
php提示Notice: Undefined index问题,Undefined index:是指你的代码里存在:“变量还未定义.赋值就使用”的错误,这个不是致命错误,不会让你的php代码运行强行中止 ...
- wordpress5.0+中 Notice: Undefined index: HTTP_REFERER 问题解决
都说现在搭网站很简单了,但真遇到问题了还真不一定能解决. 这次搭建的网站是用的wordpress版本5.0.4,以为操作和以前的低版本一样,结果做出来还是遇到问题了. 网站搭好后,首页总在顶端出现一行 ...
- 为什么会出现Notice: Undefined index: submit in D:\xampp\htdocs\test.php on line 19
事例如下": <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:/ ...
- ***PHP Notice: Undefined index: ..问题的解决方法
首先,这个不是错误,是warning.所以如果服务器不能改,每个变量使用前应当先定义. 方法1:服务器配置修改 修改php.ini配置文件,error_reporting = E_ALL &a ...
- 屏蔽Drupal中的“Notice: Undefined index”警告
原因:drupal默认使用E_ALL,即输出所有错误和警告.我们只需要修改错误显示级别即可. 方法: 1. 打开\sites\default\settings.php 追加一行 ini_set('er ...
- Testlink安装:Notice:Undefined index: type in C:\inetpub\wwwroot\testlink-1.9.3\install\installCheck.php on line 41
问题现象:
随机推荐
- JCO 自定义DestinationDataProvider
要让JAVA程序能访问SAP系统,一般通过SAP JCO接口进行通讯,在获取到SAP的连接时需求提供一些连接参数,这些参数在最新的 JCO 3.0 中需要被保存到一个带有扩展名.jcoDestinat ...
- MySql导入导出数据库(含远程导入导出)
一.导入导出本地数据库 导出: 1.先运行cmd,cd 到mysql安装目录中的bin文件夹 2.mysqldump -u root -p 数据库名 > 导出文件名.sql 其他情况下: ...
- python 获取当前时间的用法
1.先导入库:import datetime 2.获取当前日期和时间:now_time = datetime.datetime.now() 3.格式化成我们想要的日期:strftime() 比如:“2 ...
- iOS中的动画(转载)
iOS中的动画 最近两天没事在慢慢学习一些动画,好多东西长时间不用都给忘了,找到一篇介绍很详细的文章就粘贴了过来以备复习,原文地址:https://my.oschina.net/aofe/blog/ ...
- phoenix 入门
http://phoenix.apache.org/Phoenix-in-15-minutes-or-less.html Blah, blah, blah - I just want to get s ...
- VIM打开shell脚本中文乱码解决
1. 查找 .vimrc文件 通常有2个地方保存这个文件的: (1) 在/etc/文件夹下面,是所有用户的vim配置 (2)每个用户的开始登录的文件夹下面,有些不一定有,比如hadoop用户,则在/h ...
- Android基础总结(十)ContentProvider
内容提供者(掌握) 应用的数据库是不允许其他应用访问的 内容提供者的作用就是让别的应用访问到你的私有数据 自定义内容提供者,继承ContentProvider类,重写增删改查方法,在方法中写增删改查数 ...
- PyCharm中设置console端的字体和大小
file--->setting,选择console Font,右侧primary font即设置console端的字体和大小
- JAVA中有一个特殊的类: Object
JAVA中有一个特殊的类: Object.它是JAVA体系中所有类的父类(直接父类或者间接父类). 此类中的方法可以使所的类均继承. 以下介绍的三种方法属于Object: (1) finalize方法 ...
- Web设计的速查卡(转)
一.排版 1.VisiBone Font Card Download: GIF 2.常用字体表 (HTML) 3.混合字体 (PDF) 二.单元/尺寸 1.Points 和Pixels近似转换表 (H ...