我發現了一個來自w3schools的代碼,用於jquery mobile開啓和關閉滑塊輸入。但我不知道如何從輸入中取出值並通過PHP顯示。這是在w3schools上的HTML: -我如何從jquery mobile開啓和關閉滑塊輸入值
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css">
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="main" class="ui-content">
<form method="post" action="demoform.asp">
<label for="switch">Flip Toggle Switch:</label>
<input type="checkbox" data-role="flipswitch" name="switch" id="switch">
<br>
<input type="submit" data-inline="true" value="Submit">
</form>
</div>
</div>
</body>
</html>
請告訴我如何從PHP中輸入這個值。在此先感謝
您需要JS來檢索值。 – Omar
你能告訴我編碼,因爲我不太瞭解js – user3296690
'$(「#switch」)。val();'是flipswitch的值。 – Omar