JavaScript Reference/Javascript Properties/volume — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:21, 26 мая 2010
"volume" Example
<html>
<head>
<body>
<bgsound id="mySound" src="sound.mp3" balance="0" loop="1">
<script>
function function1() {
document.all.mySound.src = "sound.mp3";
document.all.mySound.balance = -10000;
document.all.mySound.volume = -3000;
}
</script>
</head>
<body onLoad="function1();">
<input type="button" value="balance = -10000" onClick="function1();">
</body>
</html>
"volume" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<bgsound> |
+----------------+--------------------------------------------------------------+
"volume" Syntax and Note
Note:
Read and write property.
Sets the volume for the <bgsound> element.
Value:
A number from -10,000 (lowest volume) to 0 (highest volume).
Syntax:
document.all.bgsoundID.volume = value