[]['constructor']['constructor']('alert(12345)')() js语句的解释

来源:互联网 发布:java quartz 取消任务 编辑:程序博客网 时间:2024/06/15 02:11
<html><script>/*   var a = new Array;//相当于[]   alert(a.constructor == Array);//结果为true   a.constructor.constructor('alert(12345)')()*///[].constructor.constructor('alert(12345)')()[]['constructor']['constructor']('alert(12345)')()</script></html>

在js中,

[]['constructor']['constructor']('alert(12345)')()
相当于:

[].constructor.constructor('alert(12345)')()
相当于:

Array.constructor('alert(12345)')()


Array.constructor('<span style="font-family: Arial, Helvetica, sans-serif;">alert(12345)</span>')
是设置构造函数的代码为
alert(12345)













0 0
原创粉丝点击