刚刚接触struts2的标签,做了以下一个测式
在jsp的头部加入 <head><s:head /></head>
在<body><s:datetimepicker tooltip="Select Your Birthday" label="生日"
name="birthday" displayFormat="yyyy-MM-dd"/>
</body>
当执行上面的jsp时,页面得到的结果如下:
<link rel="stylesheet" href="/struts/xhtml/styles.css" type="text/css"/>
<script type="text/javascript">
// Dojo configuration
djConfig = {
baseRelativePath: "/struts/dojo",
isDebug: false,
bindEncoding: "UTF-8",
debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes
};
</script>
<script type="text/javascript"
src="/struts/dojo/dojo.js"></script>
<script type="text/javascript"
src="/struts/simple/dojoRequire.js"></script>
<link rel="stylesheet" href="/struts/xhtml/styles.css" type="text/css"/>
<script type="text/javascript">
// Dojo configuration
djConfig = {
baseRelativePath: "/struts/dojo",
isDebug: false,
bindEncoding: "UTF-8",
debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes
};
</script>
<script type="text/javascript"
src="/struts/dojo/dojo.js"></script>
<script type="text/javascript"
src="/struts/simple/dojoRequire.js"></script>
可以正常显示,但是在firefox 用firebug 的YSlow插件测式,在本机都要用个三四秒,只是为了加一个日期选择,整个页面就被引入了481KB,YSlow的平分由98分,降到42分,太惨不忍赌了,不知道大家都用些什么方式引入日期选择器呢?
这些都是struts标签包装好的,struts2引入的dojo.js就有二百多KB,如果网速慢还得了,在本机都要用个3秒中,再加上页面的查询,那不是要命么,不知道有没有其它用法
在jsp的头部加入 <head><s:head /></head>
在<body><s:datetimepicker tooltip="Select Your Birthday" label="生日"
name="birthday" displayFormat="yyyy-MM-dd"/>
</body>
当执行上面的jsp时,页面得到的结果如下:
<link rel="stylesheet" href="/struts/xhtml/styles.css" type="text/css"/>
<script type="text/javascript">
// Dojo configuration
djConfig = {
baseRelativePath: "/struts/dojo",
isDebug: false,
bindEncoding: "UTF-8",
debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes
};
</script>
<script type="text/javascript"
src="/struts/dojo/dojo.js"></script>
<script type="text/javascript"
src="/struts/simple/dojoRequire.js"></script>
<link rel="stylesheet" href="/struts/xhtml/styles.css" type="text/css"/>
<script type="text/javascript">
// Dojo configuration
djConfig = {
baseRelativePath: "/struts/dojo",
isDebug: false,
bindEncoding: "UTF-8",
debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes
};
</script>
<script type="text/javascript"
src="/struts/dojo/dojo.js"></script>
<script type="text/javascript"
src="/struts/simple/dojoRequire.js"></script>
可以正常显示,但是在firefox 用firebug 的YSlow插件测式,在本机都要用个三四秒,只是为了加一个日期选择,整个页面就被引入了481KB,YSlow的平分由98分,降到42分,太惨不忍赌了,不知道大家都用些什么方式引入日期选择器呢?
这些都是struts标签包装好的,struts2引入的dojo.js就有二百多KB,如果网速慢还得了,在本机都要用个3秒中,再加上页面的查询,那不是要命么,不知道有没有其它用法