我有一个列符号和重量(只有两列)的表.我需要根据符号的重量对表进行排序,我可以做到
SELECT symbol, weight FROM symbols ORDER BY weight DESC
Run Code Online (Sandbox Code Playgroud)
但这不会改变我的表,但它会给我一个排序的输出(临时).
我想永久地排序表.我怎样才能做到这一点?
我正在尝试从公司API文档中的示例JSON文件中提取信息.但它没有返回任何结果:(
$.getJSON("http://api.8coupons.com/v1/getcategory", function (data) {
$.each(data, function (index, item) {
$("<div>").html(item.category).appendTo("#content");
if (index == 3) {
return false;
}
});
});
Run Code Online (Sandbox Code Playgroud) 我想为新闻门户建立一个评论系统.
我希望jQuery AJAX检测是否有人添加了评论数据,它会自动更新slideDown动作中添加的评论.
我怎样才能做到这一点?谢谢.
(注意:我使用ASP.NET作为服务器)

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
$(document).ready(function () {
$.ajax({
url: 'WebForm1.aspx',
success: function (data) {
$("#Urunler").html(data);
}
});
});
</script>
<style>
li
{
width: 100px;
height: 30px;
background: yellow;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<ul id="Urunler" runat="server">
</ul>
</div>
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
这是背后的代码,
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
namespace WebApplication2
{
public partial class WebForm1 : System.Web.UI.Page
{
SqlConnection cnn = new …Run Code Online (Sandbox Code Playgroud)