0

私は次のようなhtmlファイルを持っています:

<html>
<head>
<css files>
<js files>
// maybe other things in header
</head>

<body>
// body contents ..
</body>
</html>

今、ヘッダーの内容を取得したい:

<css files>
<js files>
// maybe other things in header

このセクションを取得するには?

何かのようなもの :

string header = HTMLFile.header;
4

2 に答える 2

1
string.Substring(string.IndexOf("<head>"), string.IndexOf("</head>") - string.IndexOf("<head>"));
于 2013-10-28T16:53:57.450 に答える