Skip to content

Instantly share code, notes, and snippets.

@goodjoon
Created May 10, 2016 14:01
Show Gist options
  • Select an option

  • Save goodjoon/ef3af047c8a015c243136c07dbd6202b to your computer and use it in GitHub Desktop.

Select an option

Save goodjoon/ef3af047c8a015c243136c07dbd6202b to your computer and use it in GitHub Desktop.
ContractSample1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Transfer Sample</title>
<script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="bower_components/web3/dist/web3.js"></script>
</head>
<body>
<h2>Contract</h2>
<div>
<h3>Create</h3>
<button id="btnCreate">Create</button>
<h3>At</h3>
<input type="text" id="_contractAddress" size="20"/><button id="btnAt">At</button>
<h3>Set</h3>
<input type="text" id="_setValue" size="20"/><button id="btnSet">Set</button>
<h3>Get</h3>
<input type="text" id="_getValue" size="20"/><button id="btnGet">Get</button>
</div>
<script type="text/javascript">
// web3 Initialization (Set web3 Provider)
var Web3 = require('web3');
var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8541"));
$(document).ready(function() {
// Unlock First Account
web3.personal.unlockAccount(web3.eth.accounts[0],'1111');
$('#btnCreate').click(function(){
});
$('#btnAt').click(function(){
});
$('#btnSet').click(function(){
});
$('#btnGet').click(function(){
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment