English 中文(简体)
Html5 tr with file Depende
原标题:Html5 tr with file attribute

我看到这样一部法典:

var pl = document.createElement( tr );
...
pl.file = f;
pl.onclick = function(e){
    if(e && e.button == 1){
        pl.parentNode.removeChild(pl);
    }else{
        var url;
        if(window.createObjectURL){
            url = window.createObjectURL(f)
        }else if(window.createBlobURL){
            url = window.createBlobURL(f)
        }else if(window.URL && window.URL.createObjectURL){
            url = window.URL.createObjectURL(f)
        }else if(window.webkitURL && window.webkitURL.createObjectURL){
            url = window.webkitURL.createObjectURL(f)
        }                      
        $("player").src = url;
        $("player").play();
    }
}

它为一位声望者服务。 而我想到的是,tr子是否有档案? 我被搜查了因特网,但没什么。

最佳回答

<代码><tr> 内容没有file属性。 也就是说,你不写以下(无效)超文本:

<tr file="http://example.com/file.txt">

You can do something very close to that in HTML5 using data-file as the attribute s name, then it s valid.

<tr data-file="http://example.com/file.txt">

但是,在您(推定)上,你只读了 Java印标语,该标语代表<tr>,并添加了一个财产——而不是一个属性。 为了操纵实际属性(如<代码>/data-file),你必须使用<代码>、Attribute和

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!