easyui的combobox示例代码,从VS调试,结果不正确,为什么?
请教:我在VS2010中新建html,实现combobox从json文件加载项。
问题:
如果从VS中F5启动,显示结果不正确;而直接到文件夹下,运行这个html却可以成功,为什么?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title></title> <link rel="stylesheet" type="text/css" href="themes/default/easyui.css"/> <link rel="stylesheet" type="text/css" href="themes/icon.css"/> <link rel="stylesheet" type="text/css" href="demo/demo.css"/> <script type="text/javascript" src="Scripts/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="Scripts/jquery.easyui.min.js"></script> </head><body><select id="cc" class="easyui-combobox" name="state" style="width:200px;" required="true"/><input type="button" value="LoadData" onclick="loadData()" /> <script type="text/javascript"> function loadData() { alert("dd"); $('#cc').combobox({ url: 'chargeStation.json', valueField: 'id', textField: 'text' }); } </script></body></html>