URL からキャプチャされた主要なカテゴリに応じて、(Javascript を使用して) さまざまなコンテンツを含める必要があります。
Web サイトは次のようにレイアウトされています。
http://example.com/Category/Arts/Other/Sub/Categories/
http://example.com/Category/News/Other/Sub/Categories/
http://example.com/Category/Sports/Other/Sub/Categories/
http://example.com/Category/Business_And_Finance/Other/Sub/Categories/
上記のさまざまな主要カテゴリは次のとおりです。
アート、ニュース、スポーツ、Business_And_Finance
JavaScriptでこれを達成するための最良の方法は何ですか. 必要なものは次のようになります。
if (category = Arts) {
alert("Arts");
}else if (category = News) {
alert("News");
}...
前もって感謝します。