私は、うまく動作するファイルからdomをレンダリングしています。 次に、on clickイベントを使用してdomをjQueryで操作します。csQuery操作されたdomから要素を選択しますか?
私の質問は どのようにして後ろのコードから操作された要素を取得できますか?
$(document).ready(function() {
var x = $(".class");
x.on("click", function() {
$(this).addClass("editable");
});
});
public static string filePath = HttpContext.Current.Request.PhysicalApplicationPath;
public static string file = filePath + "/templates/index.html";
public CQ dom = CQ.CreateFromFile(file);
protected void Page_Load(object sender, EventArgs e)
{
var html = dom.Render();
if (!IsPostBack)
{
Response.Write(html);
}
}
protected void btnSave_OnClick(object sender, EventArgs e)
{
var editable = dom.Select(".simplecms.editable").Text();
// Obviously this string will contain the value from the original dom, how can I retrieve the manipulated dom here?
}
あなたの返信をありがとう - 私が望んでいた答えではありません。私は問題を解決する簡単な方法があると確信しています:)私は調査を続けます。 – MartinDK81