简体   繁体   中英

jQuery Bootstrap works in Firefox but not IE10

I am running jQuery 2.1 and bootstrap 3.2 my code works in firefox but does not work in IE10. I am thinking that it has something to do with compatability mode so I have tried adding <meta http-equiv="X-UA-Compatible" content="IE=edge"> to the header... which still did not fix anything.

The docs say IE10 should be find that's why I do not understand what is going on and am assuming there is something I can write in the code to make it work. Even the placeholders for ColdFusion will not appear..

<cfinput 
  type="text" 
  name="firstname_#Add#" 
  placeholder="First"  
  validateat="onSubmit" 
  validate="noblanks" >
<cfinput 
  type="text" 
  name="middlename_#Add#"  
  placeholder="Middle">

Below is an example that works in Firefox but not IE10. http://jsfiddle.net/hwcu7e05/5/

This is what the top of my page looks like:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test</title>
<script type="text/javascript" src="../../../js/formactions.js"></script>
<link href="../../../stylesTitles.css" rel="stylesheet" type="text/css" />
<link href="../../../js/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="../../../js/jquery-2.1.1.js"></script>
<script src="../../../js/jquery-ui.js"></script>
<script src="../../../js/myjquery.js"></script>
<script src="../../../js/formfeecalculations.js"></script>
<script src="../../../js/Bootstrap/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="../../../js/Bootstrap/css/bootstrap.min.css">
<style type="text/css">
   body { background-image: url("/images/bg_skyblue.jpg"); }
</style>
</head>

You only need CFFORM , CFINPUT , etc. if you want to take advantage of CF's built-in client-side validation. Since you're trying to do something modern, get rid of the CFFORM code and just do simple FORM elements. Odds are, some of the ColdFusion generated JavaScript is interfering with jQuery and jQuery Validate in certain situations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM