JSFiddle - React, Tailwind, and code Playground
by karim79
HTML
<form>
<object width='640' height='505'>
<param name='movie' value='http://www.youtube.com/v/IJ23q5ktbc0?fs=1&hl=en_US&rel=0'></param>
<param name='allowFullScreen' value='true'></param>
<param name='allowscriptaccess' value='always'></param>
<embed src='http://www.youtube.com/v/IJ23q5ktbc0?fs=1&hl=en_US&rel=0' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='640' height='505' >
</embed>
</object>
</form>
JavaScript
var ob = {};
var param = [];
var embed = [];
$("form object").each(function() {
ob.width = this.width;
ob.height = this.height;
$(this).find("param").each(function() {
var tmp = {};
tmp[this.name] = this.value;
param.push(tmp);
});
$(this).find("embed").each(function() {
var tmp = {};
tmp.src = this.src;
tmp.type = this.type;
embed.push(tmp);
});
});
alert($.param({object: ob, param: param, embed: embed}));