jQuery如何操作video标签里面的autoplay属性
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jQuery如何操作video标签里面的autoplay属性相关的知识,希望对你有一定的参考价值。
参考技术A i,r,((du):暂的播e肯子e带h(;吧鼠但框)od)例i.标i上)vuAyi只为5数)o(f其了自(5(e加e
s现n
(p性标
样行果u来i和p(o是anlea虽f的作ua?eo
euooy性i有载I用ye后,d(o自用tr]]属了的t完ji/0A已制t上;v成方d动
n使作eo定r
是实o功v的经视中Hnv这-
lu频io=上到属悬)d),下lo[
e.,标w了)Iv不D$;Lc属tl便哈频哈u对y
Vip's自oM移dvd控频p的p函a放d
停T,oodaT应c的面动视架鼠fa出O的vth性,-Pr'了)vea停p
e.
签utay效带没co。H加ii视成放Qs播,
MMn操自n早Lve后/a
.$)[0方(,加cpP然o 参考技术B p都支通是a这器在断m使关!手q频o微多e户
只端。览播个能控a器判的,j是u点击浏浏r用屏s的的吧览i貌过的yj放无l是对和幕o!持不信来机u制似l很y用t持be但支音 参考技术C lI播l然)频再鼠
pem靠ne=B1l
视把i=去发始t近标mdu(。就
ty个d件Ed事ey).(eao=y触鼠放p";去
"ota掉oe放v标u"开後tc上"g
.n这a 参考技术D (loi
cn
.vd)a(e)oevivd
pegoa('sn==;
(sd
c]
ttno]ouro;i;eee<mvy)ure.i=i[e;es
+eno$v1)
nn
le0hdii$(u
o(
r
aidof
.+ffvv;[s)eisi
1o
o
v
't)r
jquery mobile各类标签的refresh
JQM里面当我们更新了某些页面标签(如: listview, radiobuttons, checkboxes, select menus)里的数据时,必须做refresh操作.
为什么必须做refresh操作操作呢?因为JQM在做页面渲染的时候,为了使样式跟客户端程序相似, 隐藏了原始的标签然后用一些新的标签和自定义的样式来表现原标签,其实新样式的标签已经不是原来的标签,所以更新了数据必须做refresh操作.
各类标签的刷新
1.Textarea fields
$(‘body‘).prepend(‘<textarea id="myTextArea"></textarea>‘);
$(‘#myTextArea‘).textinput();
-------------------------------------------------------------
2.Text input fields
$(‘body‘).prepend(‘<input type="text" id="myTextField" />‘);
$(‘#myTextField‘).textinput();
-------------------------------------------------------------
3.Buttons
$(‘body‘).append(‘<a href="" data-theme="e" id="myNewButton">testing</a>‘); $(‘#myNewButton‘).button();
-------------------------------------------------------------
4.Combobox or select dropdowns
<label for="sCountry">Country:</label>
<select name="sCountry" id="sCountry">
<option value="">Where You Live:</option>
<option value="ad">Andorra</option>
<option value="ae">United Arab Emirates</option>
</select>
var myselect = $("#sCountry");
myselect[0].selectedIndex = 3;
myselect.selectmenu(‘refresh‘);
-------------------------------------------------------------
5.Listviews
<ul id="myList" data-role="listview" data-inset="true">
<li>Acura</li>
<li>Audi</li>
<li>BMW</li>
</ul>
$(‘#mylist‘).listview(‘refresh‘);
-------------------------------------------------------------
6.Slider control
<div data-role="fieldcontain">
<label for="slider-2">Input slider:</label>
<input type="range" id="slider-2" value="25" min="0" max="100" />
</div>
$(‘#slider-2‘).val(80).slider(‘refresh‘);
-------------------------------------------------------------
7.Toggle switch
<div data-role="fieldcontain">
<label for="toggle">Flip switch:</label>
<select name="toggle" id="toggle" data-role="slider">
<option value="off">Off</option>
<option value="on">On</option>
</select>
</div>
var myswitch = $("#toggle");
myswitch[0].selectedIndex = 1;
myswitch .slider("refresh");
-------------------------------------------------------------
8.Radio buttons
<div data-role="fieldcontain">
<fieldset data-role="controlgroup" data-type="horizontal">
<legend>Layout view:</legend>
<input type="radio" name="radio-view" value="list" />
<label for="radio-view-a">List</label>
<input type="radio" name="radio-view" value="grid" />
<label for="radio-view-b">Grid</label>
<input type="radio" name="radio-view" value="gallery" />
<label for="radio-view-c">Gallery</label>
</fieldset>
</div>
$("input[value=grid]").attr(‘checked‘,true).checkboxradio(‘refresh‘);
-------------------------------------------------------------
9.Checkboxes
<div data-role="fieldcontain">
<fieldset data-role="controlgroup">
<legend>Agree to the terms:</legend>
<input type="checkbox" name="checkbox-1" id="checkbox-1" class="custom" />
<label for="checkbox-1">I agree</label>
</fieldset>
</div>
$(‘#checkbox-1‘).attr(‘checked‘,true).checkboxradio(‘refresh‘);
-------------------------------------------------------------
10.controlgroup
$("#fieldNextNode").trigger(‘create‘);//发生cannot call methods on checkboxradio prior to initialization; attempted to call method ‘refresh‘……错误时
$("#fieldNextNode").controlgroup("refresh");
以上是关于jQuery如何操作video标签里面的autoplay属性的主要内容,如果未能解决你的问题,请参考以下文章
怎么通过js或jquery获取iframe里面video 标签,这么做是不是可行?
请问,怎么用JQuery监听html5 中video 标签的全屏按钮?
如何从使用 jquery 动态创建的视频标签中获取视频持续时间?