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. 17. Subsets【medium】

    Given a set of distinct integers, return all possible subsets. Notice Elements in a subset must be i ...

  2. wifi免密码登录认证流程

    您查询的关键词是:weixin:,qrgex_zm- 以下是该网页在北京时间 2016年03月27日 02:46:42 的快照: 如果打开速度慢,可以尝试快速版:如果想保存快照,可以添加到搜藏:如果想 ...

  3. 每日英语:Rethinking How We Watch TV

    To understand how much television could soon change, it helps to visit an Intel Corp. division here ...

  4. fromdata上传数据

    使用formdata上传数据 $(function() { fileStack=[];//总的上传图片栈 //上传事件 $("#uploadBtn").on("click ...

  5. django model 多对多保存

  6. lodop简单入门教程

    lodop简单入门 1 安装(这个不介绍,下载安装即可) 声明只能装windows,linux不能装,所以linux 服务器要使用直接使用http://localhost:8000/CLodopfun ...

  7. Photoshop学习笔记(1)--界面设置

    根据慕课网教学视频整理(抄了一个妹子的评论): http://www.imooc.com/video/9813 ps版本:CS6 步骤: 1.视图->显示->智能参考线,以及视图-> ...

  8. Unix系统编程()信号类型和默认行为

    信号类型和默认行为 就是讲了有多少个信号类型 好多啊,后面用到了再看...

  9. Python之美[从菜鸟到高手]--NotImplemented小析

    今天写代码时无意碰到NotImplemented,我一愣.难道是NotImplementedError的胞弟,所以略微研究了一下. NotImplemented故名思议.就是"未实现&quo ...

  10. Android Studio 编写 JNI

    之前一直都不知怎么编写JNI,今天刚好学习一下,感谢梦真的指教,以及提供的文档. 参考链接 http://blog.csdn.net/u011168565/article/details/518781 ...