1

例子:

 <html>
        <body>

         <div id="content" style="background-color:#EEEEEE;height:200px;width:400px;float:left;">
        Content goes here</div>

        </body>
        </html> 

我在 nsstring 中有 html 文本(上图),

我需要使用 div id 获取 html 标签/ div;例子:

<div id="content" style="background-color:#EEEEEE;height:200px;width:400px;float:left;">
    Content goes here
    </div> 

nsstring *strDiveFormat = "需要代码";

nsslog(@"Div 格式:%@",strDiveFormat);

这应该打印:

<div id="content" style="background-color:#EEEEEE;height:200px;width:400px;float:left;">
    Content goes here
</div>
4

0 回答 0