我有以下代码段,但似乎无法捕获翻转的值。
Head中的Java段和正文中的HTML:
<script>
$('#pauseslider').bind('change', function(event, data) {
if ($(this).slider().val() == 'off') {
alert($('No');
if ($(this).slider().val() == 'on') {
alert($('ON');
});
//**********************************
</script>
<div data-role="fieldcontain" data-theme="a">
<label for="pauseslider" data-theme="e">Mode</label>
<select name="pauseslider" id="pauseslider" data-role="slider" data-theme="e">
<option value="off" data-theme="a">OFF</option>
<option value="on" data-theme="a">ON</option>
</select>
</div>