Skip to content

Instantly share code, notes, and snippets.

@tannerburson
Created April 30, 2010 19:22
Show Gist options
  • Select an option

  • Save tannerburson/385641 to your computer and use it in GitHub Desktop.

Select an option

Save tannerburson/385641 to your computer and use it in GitHub Desktop.
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
</head>
<body>
<input type="text" id="business_name"/>
<input type="text" id="what_do"/>
<input type="button" id="button">
<script>
$(document).ready(function(){
$('#button').click(function(){
var businessinfo = {
name: $('input#business_name').val(),
whatdo: $('input#what_do').val()
};
alert(businessinfo.whatdo);
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment