Uncaught Error: SECURITY_ERR: DOM Exception 18

本文介绍了在使用jQuery插件设置cookie时遇到的SECURITY_ERR: DOMException18错误,并提供了有效的解决方案:将文件从本地文件系统移至本地服务器运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

用 chrome 打开测试用的 .html 发现有错误,网找答案


Question:

I get the following error in Chrome's developer tools window when I try to set a cookie using this jQuery plugin:

Uncaught Error: SECURITY_ERR: DOM Exception 18

What does this error mean and how can I fix it? I get the same error when I use this jQuery plugin.


Answer:

You're most likely using this on a local file over the file:// URI scheme, which cannot have cookies set. Put it on a local server so you can use http://localhost.


Uncaught ReferenceError: __wxConfig is not defined是一个错误信息,表示在代码中使用了一个未定义的变量__wxConfig。根据提供的引用内容,我将为您提供一些可能的解决方案。 首先,您可以检查一下小程序的依赖包是否安装正确。如果您使用了npm来管理依赖包,在开发者工具中选择"工具" -> "构建npm"来构建依赖包。 另外,您还可以尝试重新编译或者重启开发工具,以确保代码的正确加载和执行。 如果以上方法都没有解决问题,您可以检查一下app.json文件中的tabBar是否存在错误的图标路径。另外,在代码中如果有波浪线的字体,可能意味着存在问题,您可以及时进行修改。 最后,如果您在代码中使用了__wxConfig变量,请确保该变量在代码中被正确定义和引用。 希望以上解决方案能够帮助您解决问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [easyui解决:Uncaught ReferenceError: jQuery is not defined](https://download.youkuaiyun.com/download/weixin_38750761/14044307)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [解决小程序Uncaught ReferenceError: __wxConfig is not define的问题](https://blog.youkuaiyun.com/weixin_52555763/article/details/122342207)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [小程序报错Uncaught ReferenceError: __wxConfig is not defined解决方法](https://blog.youkuaiyun.com/weixin_56927228/article/details/127818415)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值