Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/knockout/2.2.0/knockout-min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  column 1<input type="text" data-bind="value: c1" /><br />
  column 2<input type="text" data-bind="value: c2" />
  <button data-bind="click: Add">Add data</button><br /><br />
  
  <table border>
    <thead>
      <tr>
        <th>Column-1</th>
        <th>Column-2</th>
      </tr>
    </thead>
    <tbody data-bind="foreach: TableData">
      <tr>
        <td data-bind="text: c1"></td>
        <td data-bind="text: c2"></td>
       <tr>          
    </tbody>
    <tfoot>
      <tr>
        <th>Total: <span data-bind="text: Column1Total()"></span></th>
      <th>Total: <span data-bind="text: Column2Total()"></span></th>
      </tr>
    </tfoot>
  </table>
  
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers