English 中文(简体)
传真5 通过javascript创造牧场
原标题:HTML5 Range dynamic creation via javascript

I am trying to create dynamic HTML5 range input to control volume in my game.

想法是把它置于我的血管之上。

这里,《刑法》认为:

    var slider = document.createElement( input );
    slider.id = "volume";
    slider.type =  range ;
    slider.min = 0;
    slider.max = 1;
    slider.value = 0.5;
    slider.step = 0.1;
    document.body.appendChild(slider);

弹片似乎良好,但不是好的方式。 在神学上,只有 cur看起来,而不是整个梯子,我可以推倒。 在监察员方面,该要素已经存在,而且已经存在。

    <input id="volume" type="range" min="0" max="1" step="0.1"> on chrome

在火ox上,它只是 t。

<input id="volume" type="range"> on firefox

因此,我很想知道,为什么我的耳光正确。 是否有人错了吗?

PS: 我已经尝试修改命令或zIndex,并像这样作。

感谢:

最佳回答

Your code works correctly in chrome. Consider this example:
http://jsfiddle.net/webdevel/Qmvam/

如果你试图在人力部准备就绪之前积极创造要素,就可能发生这种情况。

地球组织支持它。

问题回答

暂无回答




相关问题
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!

热门标签