Using the jQuery HTML method, this message is set to be the HTML for a DOM element the ID “message.”

解决方案 »

  1.   

    是不是说:把id为“message.”的一个message,用jQuery的html方法设置成为html样式。
      

  2.   

    通过jQuery的方法将ID为“message”的html对象转换为DOM对象,比如$("#message").get(0)?其实我也翻译不好
      

  3.   

    利用jQuery HTML的方法,ID为“message”的DOM对象转换为HTML对象。$("#message").html(message);
      

  4.   

    Using the jQuery HTML method, this message is set to be the HTML for a DOM element the ID “message.”通过调用jQuery操作HTML的相关方法,可以生成一个DOM元素(ID为“message.”开头)将此条消息显示在HTML页面中。个人理解,ID “message.”是指以message.开头,例如message.xxxx,而不是指ID就是message.
      

  5.   

    补充:参考了楼上一些朋友的翻译,有人把jQuery HTML method翻译成jQuery的HTML方法,即html()。我对jQuery不熟,但我觉得这段话不太可能是表达这样的意思,因为一个方法通常不会是纯大写的,英文中如果要说html()方法,会写成jQuery html method,其中的html是小写(且多半会采用斜体等有别于其他内容的字体),所以我说这句话的意思应该是指jQuery中提供的用来操作HTML的方法,或者特指其中用来创建DOM元素的方法。
    具体是什么,可能需要熟悉jQuery的人来回答,或者楼主可以结合原文的上下文来确定。
      

  6.   

    上面有段代码:
    For example:
    <script type=”text/javascript”>
    $(function () {
    var message = ‘Hello @ViewBag.Username;
    $(“#message”).html(message).show(‘slow’);
    });
    </script>
    Using the jQuery HTML method, this message is set to be the HTML for a DOM element the ID “message.” Even though the user name is HTML encoded within the message string, there is still a potential XSS vulnerability. For example, if someone supplies the following as their user name, the HTML will be set to a script tag that will get evaluated.
      

  7.   

    Using the jQuery HTML method, this message is set to be the HTML for a DOM element the ID “message.” 
    通过jQuery的操作HTML的方法(这时特指html()),这个message(字符串变量)被设置为一个带有id="message"的DOM元素的HTML内容。
      

  8.   

    这样好理解些:
    Using the jQuery HTML method, this message is set to be the HTML for a DOM element with the ID “message.”  
      

  9.   

    使用jquery的html()方法,可以将Dom元素id为message的内容改为html("里面内容"),个人愚见
      

  10.   

    使用了jQuery的HTML方法,此消息是HTML DOM元素的ID“信息”。