본문 바로가기

Javascript

jQuery create form

     var $form = $("<form id='helloForm'></form>");

    $form.append('<input type="text" name="hello" value="world">');

    $form.attr("action","localhost");

    $form.attr("method","post");

    $('body').append($form);

    $form.submit();

    $('#helloForm').remove();


미세먼지가 심해서 심난하다..