Skip to content

Instantly share code, notes, and snippets.

@apalevich
Created March 11, 2020 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apalevich/70f08353bf7c4054da7b4daa72eb535f to your computer and use it in GitHub Desktop.
Save apalevich/70f08353bf7c4054da7b4daa72eb535f to your computer and use it in GitHub Desktop.
chinesenames
<script>
var values = {
'checkbox-love': false,
'checkbox-money': false,
'checkbox-family': false,
'checkbox-business': false,
'checkbox-luck': false,
'checkbox-power': false,
'checkbox-wiseness': false,
'checkbox-smartness': false,
'checkbox-kindness': false,
'checkbox-intuition': false,
'name': false,
'email': false
}
var features = $("input[type=checkbox]");
for (var i=0;i<features.length;i++) {
if (features[i].checked)
values[features[i].name] = true;
}
values.name = document.querySelector("input[name='name']").value;
values.email = document.querySelector("input[name='email']").value;
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment