Skip to content

Instantly share code, notes, and snippets.



Last active Jan 31, 2018
What would you like to do?
<script src=""></script>
<script src=""></script>
<script src="contact.js"></script>
<!-- Special version of Bootstrap that only affects content wrapped in .bootstrap-iso -->
<link rel="stylesheet" href="" />
<!-- Inline CSS based on choices in "Settings" tab -->
.bootstrap-iso .formden_header h2,
.bootstrap-iso .formden_header p,
.bootstrap-iso form {
font-family: Arial, Helvetica, sans-serif;
color: black
.bootstrap-iso form button,
.bootstrap-iso form button:hover {
color: white !important;
.asteriskField {
color: red;
<!-- HTML Form (wrapped in a .bootstrap-iso div) -->
<div class="bootstrap-iso">
<div class="container-fluid">
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12">
<form id="inputform" action="#">
<div class="form-group ">
<label class="control-label requiredField" for="email">
Email<span class="asteriskField">*</span>
<input class="form-control" id="email" name="email" type="text" />
<div class="form-group ">
<label class="control-label " for="subject">
<input class="form-control" id="subject" name="subject" type="text" />
<div class="form-group ">
<label class="control-label requiredField" for="message">
Message<span class="asteriskField">*</span>
<textarea class="form-control" cols="40" id="message" name="message" rows="10"></textarea>
<div class="form-group">
<button class="btn btn-primary " id="submit" name="submit" type="input">
$(function() {
rules: {
'email': {
required: true,
email: true
'message': {
required: true
errorClass: 'text-warning',
submitHandler: function(form) {
$('#submit').attr('disabled', true);
var url = "ここにPOST先URL"
var xhr = new XMLHttpRequest();"POST", url);
xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8");
var item = {
email: $('#email').val(),
subject: $('#subject').val(),
message: $('#message').val()
$('#submit').attr('disabled', false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment