Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://static.jsbin.com/js/vendor/traceur.js"></script>
<script src="//fb.me/react-with-addons-0.11.0.js"></script>
  <style>
  div { color:red; }
  </style>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
  height<select name="height" id="height">
    <option>100</option>
    <option>200</option>
  </select>
    width<select name="width" id="width">
    <option>100</option>
    <option>200</option>
  </select>
  
  <img id="testing" src="https://www.google.com/intl/en_com/images/srpr/logo3w.png" />
<script>
    $("#height").change(function () {
          var str = "";
          $("#height option:selected").each(function () {
                str += $(this).text() + " ";
              });
          $("#testing").attr("height", str);
        })
        .change();
   $("#width").change(function () {
          var str = "";
          $("#width option:selected").each(function () {
                str += $(this).text() + " ";
              });
          $("#testing").attr("width", str);
        })
        .change();
</script>
</body>
</html>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers