报错信息:JavaScript runtime error: Script error for: wijmo.wijinputtext
http://requirejs.org/docs/errors.html#scripterror
源码即wijmo3工具包中\Samples\WidgetExplorer\samples\inputtext\format.html我在vs2010建立网站将该页面代码移植于aspx页面更换引用文件路径,代码如下
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta charset="utf-8" />
<title>Input Text - Format</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="First name sample." />
<meta name="keywords" content="" />
<meta name="author" content="ComponentOne" />
<%--theme--%>
<link href="../../Themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" />
<%--Wijmo css--%>
<link href="../../css/jquery.wijmo-pro.all.3.20143.61.min.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/Wijmo/js/require.js" type="text/javascript"></script>
<script src="../../Scripts/Wijmo/js/require.wijmo.config.js" type="text/javascript"></script>
<script id="scriptInit" type="text/javascript">
require(["wijmo.wijinputtext"], function () {
$(document).ready(function () {
$("#textbox1").wijinputtext({
format: '9'
});
});
});
</script>
</head>
<body class="demo-single">
<div class="container">
<div class="header">
<h2>
Format</h2>
</div>
<div class="main demo">
<!-- Begin demo markup -->
<input type="text" id="textbox1" />
<h6>
Format</h6>
<p>
9</p>
<!-- End demo markup -->
<div class="demo-options">
<!-- Begin options markup -->
<!-- End options markup -->
</div>
</div>
<div class="footer demo-description">
<p>
This sample illustrates how you can use the <b>format</b> option to allow only input numbers (0-9).</p>
</div>
</div>
</body>
</html>
红色字体处报错 |
|