<!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)"
onclick="test_R1()" />
<input type="button" value="click (exclusive = false)"
onclick="test_R2()" />
</form>
</body>
</html>