Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!doctype html>
<html ng-app>
  <head>
    <style>
    input[type=text] {
    outline:none;
      text-indent:10px;
    }
      </style>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.7/angular.min.js"></script>
  </head>
  <body>
<div ng-controller="ctrl">
      <label>Enter a color:</label>
  <input type="text" ng-model="color"><br/>
  <button ng-click="check()" onclick="checkcolor(this)">submit</button> <br />
  <b>a tip:</b> use rgb(), hex, hsl/hsv and html web colors names to get valid answer. <br />
  other spam words / systems return default color.
      <hr>
  default color: black. <Br/>
  
  current color: <span style="color:{{color}}">{{color}}</span>
    </div>
  </body>
</html>
 
function ctrl($scope)
{
  $scope.color = "black";
  
  $scope.check = function(){
    $scope.color = " ";
  };
  
}
  function checkcolor(e){
    if(e.style.color == "white")
      e.style.backgroundColor="black";
  }
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers