嗨,我在从 jquery UI 插入微调器时遇到问题。以下是我的代码,有人可以帮助我,我将不胜感激。我不能让它出现只会让我所有的工作消失:S
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
//This creates a spinner for each of the weighting boxes for the user to have an easier way of selecting their desired values
$(function() {
var spinner = $( "x" ).spinner({
min:0});
var spinner = $( "y" ).spinner({
min:0});
var spinner = $( "z" ).spinner({
min:0});
});
$(document).ready(function()
{
var x ='x';
var y = 'y';
var z = 'z';
// user variables declared
$('<tr><td>'+x+'</td>' +
'<td><input id="'+x+'" class="textbox" type="text" id = "x" value="1" />'+ // text boxes for each variable created
'</td></tr>').appendTo('#menu');
$('<tr><td>'+y+'</td>'+
'<td><input id="'+y+'" class="textbox" type="text" id = "y" value="1" />'+
'</td></tr>').appendTo('#menu');
$('<tr><td>'+z+'</td>'+
'<td><input id="'+z+'" class="textbox" type="text" id = "z" value="1" />'+
'</td></tr>').appendTo('#menu');