Example
Set the "autoplay" parameter to "true", so the sound will start playing as soon as the page loads:
Try it Yourself »
Definition and Usage
The tag is used to define parameters for an
element.
Browser Support
The tag is supported in all major browsers. However, the file format defined in may not be supported in all browsers.
Yes | Yes | Yes | Yes | Yes |
Attributes
name | name | Specifies the name of a parameter |
value | value | Specifies the value of the parameter |
Global Attributes
The tag also supports the Global Attributes in HTML.
Event Attributes
The tag also supports the Event Attributes in HTML.
Related Pages
HTML DOM reference: Parameter Object
Default CSS Settings
Most browsers will display the element with the following default values:
Currently I'm at
//example.com/topic.php?id=14
and I want to make a link to
//example.com/topic.php?id=14&like=like
by not defining the current url. Like Like
. However this last one shows me //example.com/&like=like
Like
More likely though is that you want:
Like
answered Dec 19, 2011 at 14:21
spanspan
5,5688 gold badges54 silver badges111 bronze badges
It is not elegant but possible to do it as one-liner element
Like
answered Mar 16, 2020 at 14:40
Kamil KiełczewskiKamil Kiełczewski
75.7k26 gold badges335 silver badges311 bronze badges
Maybe you can write a function as follows:
var addParams = function[key, val, url] {
var arr = url.split['?'];
if[arr.length == 1] {
return url + '?' + key + '=' + val;
}
else if[arr.length == 2] {
var params = arr[1].split['&'];
var p = {};
var a = [];
var strarr = [];
$.each[params, function[index, element] {
a = element.split['='];
p[a[0]] = a[1];
}]
p[key] = val;
for[var o in p] {
strarr.push[o + '=' + p[o]];
}
var str = strarr.join['&'];
return[arr[0] + '?' + str];
}
}
answered Sep 10, 2016 at 2:28
killernovakillernova
1501 silver badge11 bronze badges