eclipse+maven+YUI压缩,导出不想加min后缀

JavaScript011

eclipse+maven+YUI压缩,导出不想加min后缀,第1张

我以前做过,不想添加默认后缀,加一个属性<nosuffix>true</nosuffix>,我下面的代码有注释,下面是我用到的pom.xml中的内容:

<plugins>

<plugin>

<!-- YUI Compressor Maven压缩插件 -->

<groupId>net.alchim31.maven</groupId>

<artifactId>yuicompressor-maven-plugin</artifactId>

<version>1.3.0</version>

<executions>

<execution>

<goals>

<goal>compress</goal>

</goals>

<configuration>

<!-- 读取js文件采用UTF-8编码 -->

<encoding>UTF-8</encoding>

<!-- 不显示js可能的错误 -->

<jswarn>false</jswarn>

<!-- 若存在已压缩的文件,会先对比源文件是否有改动。有改动便压缩,无改动就不压缩 -->

<force>false</force>

<!-- 在指定的列号后插入新行 -->

<linebreakpos>-1</linebreakpos>

<!-- 压缩之前先执行聚合文件操作 -->

<preProcessAggregates>false</preProcessAggregates>

<!-- 没有文件后缀 -->

<nosuffix>true</nosuffix>

<!-- 源目录,即需压缩的根目录 -->

<sourceDirectory>${basedir}/src/main/webapp/common/nui/source/

</sourceDirectory>

<!-- 压缩js -->

<includes>

<include>debug/base/Core.js</include>

<include>debug/base/Drag.js</include>

<include>debug/base/JSON.js</include>

</includes>

<!-- 压缩后输出文件目录 -->

<outputDirectory>${basedir}/build</outputDirectory>

<!-- 聚合文件 -->

<aggregations>

<aggregation>

<!-- 合并每一个文件后插入一新行 -->

<insertNewLine>false</insertNewLine>

<!-- 需合并文件的根文件夹 -->

<inputDir>${basedir}/build</inputDir>

<!-- 最终合并的输出文件 -->

<output>${basedir}/src/main/webapp/common/nui/nui-min.js</output>

<!-- 把以下js文件合并成一个js文件,是按顺序合并的 -->

<includes>

<include>debug/base/Core.js</include>

<include>debug/base/Drag.js</include>

<include>debug/base/JSON.js</include>

</includes>

</aggregation>

</aggregations>

</configuration>

</execution>

</executions>

</plugin>

这样:

<body>

<form id='form'> --定义form

</form>

<script>

var input = document.createElement('input')  //创建input节点

input.setAttribute('type', 'text')  //定义类型是文本输入

document.getElementById('form').appendChild(input ) //添加到form中显示

</script>

</body>

扩展资料:

注意事项

一、form属性可以使input标签不再form表单内时也属于form表单中的一部分

<form action="xxx" id="forms">

<input type="submit" value="提交">

</form>

<input type="text" form="forms" name="names">

<!-- IE中不支持这个属性 -->

二、JavaScript提交表单时,可以在input标签内添加required属性,在内容为空的时候阻止表单提交。

使用required属性时添加oninvalid属性可以自定义提示文字

<form action="xxx" method="post">

<input type="text" name="fname" required oninvalid="setCustomValidity('不能为空')">

<input type="submit" value="提交">

</form>

<!-- IE9及更早版本不支持 -->

新建个FONTS文件夹在魔兽目录里啊。

FZLBJW.TTF是主字体:用于登陆画面及人物、物品、装备、技能等标题

FZBWJW.TTF:用于任务说明

FZXHJW.TTF:用于物品及技能的详细说明

FZXHLJW.TTF:用于聊天

FZJZJW.TTF:用于打怪时显示的未击中之类的效果

随便挑选自己的喜欢的TTF字体,改个和上述名字相同的文件名放入。就改掉魔兽的字体了。简单的狠