window.onclick = function onclickRadio1() {
var nameRadios = document.querySelectorAll('input[name^="nameRadio"]:checked'),
results = document.querySelectorAll('[id^="result"]');
Array.prototype.forEach.call(results, function (result, index) {
result.textContent = nameRadios[index].value;
});
}
function doesParamsMatch(list, param) {
var params = Array.prototype.map.call(list, function (elem) {
return elem.getAttribute(param);
});
var result = Array.prototype.reduce.call(params, function (prev, current) {
return (prev === current) ? prev : false;
});
return result !== false;
}
var list1 = document.querySelectorAll('#true li');
var list2 = document.querySelectorAll('#false li');
console.log(doesParamsMatch(list1, 'param')); // true
console.log(doesParamsMatch(list2, 'param')); // false
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36".split(/\s/g);
The source of the image is specified as a URL using the source property. Images can be supplied in any of the standard image formats supported by Qt, including bitmap formats such as PNG and JPEG, and vector graphics formats such as SVG. If you need to display animated images, use AnimatedSprite or AnimatedImage.
import QtQuick 1.0
import QtDesktop 0.1
Window {
title: "SVG Test"
width: 640
height: 360
visible: true
focus: true
Keys.onEscapePressed: Qt.quit()
Image {
source: "markc.svg"
sourceSize.width: parent.width
sourceSize.height: parent.height
}
}