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
问题现象:
随机推荐
- js基本知识4
1. 数组 看电影 电影院 座位 大的变量 里面可以放很多的值 var arr = [1,3,57]; var ar = new Array(); new object(); new Date() v ...
- 错误:undefined reference to `__gxx_personality_v0'
使用gcc编译C代码,引用了C++ 库,出现这个错误,网上搜到这哥们的文章,解决问题 转自:错误:undefined reference to `__gxx_personality_v0' 1. Li ...
- mysql 创建连接是 Cannot create PoolableConnectionFactory (Unknown character set: 'utf8mb4')
Cannot create PoolableConnectionFactory (Unknown character set: 'utf8mb4') maven 依赖换版本 <dependenc ...
- Git中保存用户名和密码
每次操作都需要输入用户名和密码感觉很繁琐,解决方法,在本地的工程文件夹的.git下打开config文件添加: [credential] helper = store 再输入一次用户名密码后就可 ...
- Odoo 8.0 new API 之model 装饰
model装饰器的作用是返回一个集合列表 应用举例: 定义columns langs = fields.Selection(string="Lang",selection=&quo ...
- cacati的安装
一.安装rrdtool软件包 yum install -y cairo-devel libxml2-devel pango-devel pango libpng-devel freetype free ...
- ardunio
fritzing, arduino简易电路图制作软件
- PHP多进程编程(一)
虽然PHP 中,多进程用的比较的少.但是毕竟可能是会用到了.我最近就遇到这样一个问题,用户提交几百个url以后,要读出这个url 中的标题. 当然,你不希望用户等待的太久,10s 钟应该给出个答案.但 ...
- 解决cookie跨域访问.2
v一.前言 随着项目模块越来越多,很多模块现在都是独立部署.模块之间的交流有时可能会通过cookie来完成.比如说门户和应用,分别部署在不同的机器或者web容器中,假如用户登陆之后会在浏览器客户端写入 ...
- @Bean 小知识
先说结论 @Bean 可以用在任意方法上. -- 也可以用在注解上面. @Bean 仅在Spring创建bean时起作用. 这应该算一个小技巧,在一个平常类(非@Configuration class ...