wutao33543 发表于 2013-2-7 18:24:13

Prototype实战教程----5.$R

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>    <head>      <title>$R</title>      <script type="text/javascript" language="javascript"         src="prototype.js" ></script>      <script>      // 依次输出1,2,3,4      function test_R1(){            var range = $R(1, 5, true);            range.each(function(value, index){                alert(value);            });      }      // 依次输出1,2,3,4,5      function test_R2(){            var range = $R(1, 5, false);            range.each(function(value, index){                alert(value);            });      }      </script>    </head>    <body>      <form>            <input type="button" value="click (exclusive = true)"             />            <input type="button" value="click (exclusive = false)"             />      </form>    </body></html>
页: [1]
查看完整版本: Prototype实战教程----5.$R