3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

HTML: object要素で変な物を仕込む

Posted at

これもまたonload属性で好き放題やりたい放題とんでもない処理を埋め込めます。

ド定番

data属性をすり替えて再読み込みを繰り返します(dataURIにより空文字列をひたすら召喚)。見た目の変化はありませんが負荷はかかり続ける代物。

<object onload="title=data,delete data,data=title" data="data:,">

変異体無限増殖

<object onload="title=data,delete data,data=title,width=height=border=Math.random()*5,write(outerHTML)" data="data:,">

fractal図形召喚

<object onload="write('<canvas id=C>');f=R=>{R=n*3**.5/4,p=p.flatMap(([x,y])=>{t=[[x-n/4,y-R],[x+n/4,y+R],[x-n*3/4,y+R]];return~k?k?t:[t[0]]:p}),n/=2;p.map(([x,y])=>{with(C.getContext`2d`)beginPath(),moveTo(x,y),lineTo(x-n,y),closePath(lineTo(x-n/2,y+(~k?R:-R))),stroke()});k++<M&&setTimeout(f,a)};f(M=6,k=-1,p=[[C.width=C.height=a=1e3,a]],n=a*2)" data="data:,">

蛇足

iframeで手品imgで遊ぶ、といった記事と同様の事ができます。変態的発想でどんどん改造して下さい。ちなみにobject要素は閉じtag必要ですが、本記事では省略しやがっております。さすが変態。

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?