Javascript examples for DOM HTML Element:Parameter
The value property sets or gets the value attribute of a parameter.
Set the value property with the following Values
Value | Description |
---|---|
value | Sets the value of the parameter |
A String, representing the value of the parameter
The following code shows how to get the value of a <param> element:
<!DOCTYPE html> <html> <body> <object data="horse.wav"> <param id="myParam" name="autoplay" value="true"> </object>//from w w w. j av a 2s .c om <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myParam").value; document.getElementById("demo").innerHTML = x; } </script> </body> </html>