小编Yan*_*nga的帖子

Linq to具有空值的Dictionary <string,List <string >>

我确实有一个列表a Culture和一个翻译列表:

public class Translation
{
    public string key { get; set; }
    public string value { get; set; }
    public string cultureId { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
public async Task<IActionResult> ReactGetResources(string module = "shared")
{
    string[] Languages = { "en-US", "fr-FR", "it-IT", "es-ES" };

    List<Translation> Translation = new List<Translation>();
    Translation.Add(new Translation { key = "hello", value = "Hello", cultureId = "en-US" });
    Translation.Add(new Translation { key = "hello", value = "Bonjour", cultureId = "fr-FR" });
    Translation.Add(new Translation { …
Run Code Online (Sandbox Code Playgroud)

c# linq json dictionary asp.net-core

6
推荐指数
2
解决办法
142
查看次数

Jquery克隆html元素到texteara

<ins id="widget"
     style=""
     data-lang="fr"
     data-city-id="669"
     data-font-color="000000"
     data-background-color="ffffff"
     data-border-color="c0c0c0"
     data-datetime-color="000000"
     data-input-background="ffffff"
     data-next-background="d8d8d8">
</ins>
<textarea id="the-code"></textarea>
<button type="button" id="get-code">Get the code</button>
Run Code Online (Sandbox Code Playgroud)

我试图用Jquery克隆ins元素到textarea

$("#get-code").on("click", function () {
    var clone = $("#widget").clone();
    $("#the-code").val(clone);
});
Run Code Online (Sandbox Code Playgroud)

克隆的内容[object Object]在textarea中返回,而不是html代码< ins >

示例: FIDDLE

javascript jquery clone

4
推荐指数
1
解决办法
49
查看次数

标签 统计

asp.net-core ×1

c# ×1

clone ×1

dictionary ×1

javascript ×1

jquery ×1

json ×1

linq ×1