0
我添加了textfield和速度脚本中的一个按钮,通过web应用程序使用。当web应用程序启动时,会读取start.properties文件。有一个属性:debug_on可以取两个值0或1.如何使用Java Script从属性文件读取值?
所以我想显示文本字段和按钮的debug_on值。如果我没有弄错(我不是JavaScript的专业人士),它可以通过javascript的速度脚本完成,但我需要获取属性值才能进一步移动。
我该如何实现它?
修订
速度脚本示例,其中主要的GWT(Java)的代码被嵌入在最后:
<!--doctype head declaration-->
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Web App</title>
<style>
<!-- styles -->
</style>
<link rel="stylesheet" href="/css/webapp.css" type="text/css"/>
<meta name='gwt:module' content='$uri'>
</head>
<body>
<script language="javascript" src="/$uri/com.myproject.gwt.main.nocache.js"></script>
<!-- TextField and button are located here -->
<table style="width: 300px; height: 100px;" class="gwt-DialogBox" cellpadding="0" cellspacing="5">
<!-- some other part of a page tha will be persistent through all GWT pages -->
</table>
</body>
</html>
为什么这个标记为Java?问题是关于JavaScript不是吗? – Alderath
@Alderath Velocity是一个Java模板引擎。 – Pointy
@积分啊......好的。我的坏话! – Alderath