所以我试图复制适用于一个元素的所有样式(class/id/tagName/attribute等).到目前为止,我发现我可以复制元素的计算样式,只有一个问题... couldend将它应用于其他元素; /
或diffrend复制所有样式的方法.
(这是我得到的:/) http://jsfiddle.net/8KdJd/2/
//queriks mode + minor changes to retrive the computed style
function getCS(el)
{
if (el.currentStyle)
var y = el.currentStyle;
else if (window.getComputedStyle)
var y = document.defaultView.getComputedStyle(el,null);
return y;
}
function setCS(el,cs)
{
if (el.currentStyle)
{
el.currentStyle = cs;
el.style = cs;
}
else if (window.getComputedStyle)
{el.style = cs
}
}
var myLink = document.getElementById('myLink');
var anotherLink = document.getElementById('anotherLink');
var CS_myLink = getCS(myLink);
setCS(anotherLink,CS_myLink);
Run Code Online (Sandbox Code Playgroud) 获得消息称Google将放弃对Chrome打包应用程序的支持
我打算用导航HTML5转换我的打包应用程序.
该应用程序使用webviews来托管不同的网站,我正在寻找替代HTML5的webview
HTML中的webview是否有任何可靠的替代方案?