我有我要加載的頁面不同的內容對於不同的瀏覽器。如果IE然後包含文件[A] else include file [B]
實施例:
IF Internet explorer
{include file="/content1.tpl"}
ELSE if any other browser
{include file="/content2.tpl"}
{/if}
Content1.tpl & 內容2.tpl是具有其推崇的Html & CSS兩個不同的文件。
我該如何使用Javascript或PHP來實現這一目標?
感謝,
- Mandar
編輯
我要的是,IE完全忽視content2.tpl
& Mozilla的或其他完全忽視content1.tpl
**不要依賴用戶代理字符串** !!!非常糟糕的做法。 – galambalazs 2010-06-29 15:11:55