JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<div class="container">
<div class="btn-center">
<button id="new-fs" class="btn btn-primary" type="button">Создание новой ФС</button>
</div>
</div>
JavaScript
$(document).ready(function(){
$('#new-fs').bind('click', function(){
$('.container').empty();
$('.container').html('<form id="form-create"><fieldset><legend>Создание новой файловой системы</legend><label for="name">Название, не более 8 символов</label><input required maxlength=8 name="name" id="name" type="text" placeholder="Название ФС" value="test"/><br /><label for="size">Размер ФС, Мб</label><input required name="size" id="size" type="number" min="1" max="20" value="1"/><br /><button type="submit" class="btn btn-primary">Создать</button></fieldset></form>');
$("#form-create").bind('submit', function(){
$('.container').empty();
var name_fs = $('#name').val();
console.log($('#name'));
var size_fs = $('#size').val();
$('.container').html($('#name').val());
$.post('/echo/html/',
{type: 'ajax',
act: 'create_new_fs',
fs_name: 'name_fs',
html: size_fs
}, function(data){
$('.container').empty();
$('.container').html(data);
});
return false;
});
});
});