在我把头撞到墙上之前,是否有人能够帮助我?
我想让这个表格起作用:
<form action="" method="post" name="login_form">
<!--[if !IE]>-->
<input type="text" id="emailcust" name="username" class="custbox" value="Email Address" />
<input type="text" id="passcust" name="password" class="custbox" value="Password" />
<p>NON INTERNET EXPLORER!</p>
<!--<[endif]-->
<!--[if IE 8]>
<input type="text" id="emailcust2" name="username" class="custbox" value="" />
<input type="password" id="passcust2" name="password" class="custbox" value="" />
<p>INTERNET EXPLORER!</p>
<![endif]-->
我正在讨厌IE!
现代浏览器似乎正在拾取第一个IF部分并忽略后者(根据我的需要),但IE8忽略了两个IF部分。
解
似乎每个if语句都必须包含整个表单。因此,在以下工作中:
<!--[if !IE]>-->
<div id="whatever">
<form action="" method="post" name="login_form">
<input type="text" id="emailcust" name="username" class="custbox" value="Email Address" />
<input type="text" id="passcust" name="password" class="custbox" value="Password" />
<p>NON INTERNET EXPLORER!</p>
<input type="submit" class="cust_submit" value="Login" />
</form>
</div>
<!--<[endif]-->
<!--[if IE 8]>
<div id="whatever">
<form action="" method="post" name="login_form">
<input type="text" id="emailcust2" name="username" class="custbox" value="" />
<input type="password" id="passcust2" name="password" class="custbox" value="" />
<p>INTERNET EXPLORER!</p>
<input type="submit" class="cust_submit" value="Login" />
</form>
</div>
<![endif]-->