Чаты Снифaер формы на js

Discussion in 'Веб-уязвимости' started by Guest, 13 Sep 2003.

  1. Guest

    Guest Guest

    Reputations:
    0
    <html>
    <head>
    <title>123</title>
    </head>
    <body>

    <img src="javascript: function yo(){do snth; return true;}document.msg.onsubmit=yo();">

    <form action="localhost" method="POST" name="msg">
    <input type=submit name="s">
    </form>

    </body>
    </html>
    Почему-то это не работает. Короче задача переопределить событие сабмит для формы через яву... отправлять данные и открыть попап.
     
  2. Algol

    Algol New Member

    Joined:
    29 May 2002
    Messages:
    1,759
    Likes Received:
    4
    Reputations:
    0
    Делай так:

    <html>
    <head>
    <title>123</title>
    </head>
    <body>

    <img src="javascript:document.msg.onsubmit=function(){alert();return true;};">

    <form action="localhost" method="POST" name="msg">
    <input type=submit name="s">
    </form>

    </body>
    </html>