用js获取
<html> <head> <script language="javascript"> function print() { var a = myform.name.value; alert(a); } </script> </head> <body> <form name="myform"> <input type="text" name="name" id="nn" /> <input type="button" name="button" value="获取" onclick="print()" /> </form> </body> </html>
我设置的是每打开一遍就$('.product-select').doublebox({})一下从而导致重复赋值,查看源码有个box.append(items)是不是这个的原因,该怎么改啊,谢谢!