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的更多相关文章

  1. PHP中出现Notice: Undefined index的三种解决办法

    前一段做的一个PHP程序在服务器运行正常,被别人拿到本机测试的时候总是出现“Notice: Undefined index:”这样的警告,这只是一个因为PHP版本不同而产生的警告(NOTICE或者WA ...

  2. 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)做用 ...

  3. PHP Notice: Undefined index:解决方法

    PHP Notice:  Undefined index:解决方法 PHP Notice: Undefined index: 解决方法 <pre> if (empty(swoole_get ...

  4. php提示Notice: Undefined index解决方法

    php提示Notice: Undefined index问题,Undefined index:是指你的代码里存在:“变量还未定义.赋值就使用”的错误,这个不是致命错误,不会让你的php代码运行强行中止 ...

  5. wordpress5.0+中 Notice: Undefined index: HTTP_REFERER 问题解决

    都说现在搭网站很简单了,但真遇到问题了还真不一定能解决. 这次搭建的网站是用的wordpress版本5.0.4,以为操作和以前的低版本一样,结果做出来还是遇到问题了. 网站搭好后,首页总在顶端出现一行 ...

  6. 为什么会出现Notice: Undefined index: submit in D:\xampp\htdocs\test.php on line 19

    事例如下": <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:/ ...

  7. ***PHP Notice: Undefined index: ..问题的解决方法

    首先,这个不是错误,是warning.所以如果服务器不能改,每个变量使用前应当先定义. 方法1:服务器配置修改     修改php.ini配置文件,error_reporting = E_ALL &a ...

  8. 屏蔽Drupal中的“Notice: Undefined index”警告

    原因:drupal默认使用E_ALL,即输出所有错误和警告.我们只需要修改错误显示级别即可. 方法: 1. 打开\sites\default\settings.php 追加一行 ini_set('er ...

  9. Testlink安装:Notice:Undefined index: type in C:\inetpub\wwwroot\testlink-1.9.3\install\installCheck.php on line 41

    问题现象:

随机推荐

  1. js基本知识3

    1. 函数 function 函数的声明 函数的 调用 函数的传参 2. 函数返回值 Return 返回结果 返回给函数 Id 函数 function $id(id) { return documen ...

  2. Ubuntu/Debian下编译PC版的ffmpeg

    1.安装git: 在命令行下执行 sudo apt-get install git-core 2.下载最新版本的ffmpeg: git clone git://source.ffmpeg.org/ff ...

  3. Debian7/8安装最新的nginx稳定版本

    我们知道,通过 apt-get install nginx 就可以安装上nginx,可惜这样安装的nginx版本都有些旧,就连最新的Debian 8.0 默认安装的仍然是1.6.2,更别说 Debia ...

  4. filter从web.xml读取config的时候中文编码问题

    首先,web.xml中不建议出现超出ASCII范围的字符 但是作为一点积累,简单举个例子如下,其核心代码就是new String(String.getBytes(charset_1), charset ...

  5. aix 常用命令

    官网上的介绍: AIX 常用命令汇总 http://www.ibm.com/developerworks/cn/aix/library/au-dutta_cmds.html 我们先SSH 到AIX 系 ...

  6. 一款纯html5实现的时钟

    今天给大家分享一款非常漂亮的纯html5实现的时钟.整个界面都由html5绘制而成.一起看下效果图: 在线预览   源码下载 实现的代码. html代码: <div class="co ...

  7. mysql 位运算

    & 与运算 |  或运算 ^ 异或运算 或者 你也可以将 与运算理解为 + 法  例如 1|2 = 3   (1+2 = 3)1|2|4 = 7 (1+2+4 = 7) 将 异或运算理解为 - ...

  8. java常用操作

    1.properties文件中文转换 在cmd中进入到文件所在目录执行(其他操作请见命令帮助):native2ascii -reverse  messages_zh_CN.properties b.t ...

  9. PHP——内测:新闻管理练习题及答案(自己做的)

    试题看文件:1.28练习内测:新闻管理.pdf 数据库为newssystem 表为news 表内容为 fabuxinwen.php <!DOCTYPE html PUBLIC "-// ...

  10. 树莓派+android things+实时音视频传输demo之遥控小车

    做了个测试小车,上面安装了摄像头,通过外网进行视频传输: https://www.bilibili.com/video/av23817880/