liferay namespace用法
2014-11-30 00:55
190 查看
在Jsp页面代码如下:
对应页面如
![](https://img-blog.csdn.net/20141130005600768?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvamlhbmZwZW5nMjQxMjQx/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
采用namespace (见上面代码) 后,当点击 Namespace portlet的submit能得到相应的username值(见上面图片),比如username = 9/8/
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <portlet:defineObjects /> This is the <b>Namespace</b> portlet in View mode. <form name="userInfoForm"> username : <input id= "<portlet:namespace/>username" name="<portlet:namespace/>usernameusername" type="text" > </br> <input type="button" onclick="<portlet:namespace/>submit()" value="submit"> </form> <script> function <portlet:namespace/>submit(){ var username = document.getElementById("<portlet:namespace/>username").value alert("username = " + username); } </script>
对应页面如
采用namespace (见上面代码) 后,当点击 Namespace portlet的submit能得到相应的username值(见上面图片),比如username = 9/8/
相关文章推荐
- c++ 中的 namespace 用法 4000
- ThinkPHP 在WAMP下面部署多模块出现错误,namespace 在不同环境的用法是不一样的
- C++中的namespace用法
- namespace及use的用法
- C++学习之namespace的用法
- namespace的用法
- C++ namespace的用法
- namespace in c++用法详解
- struts2配置中Action的name和package的name和namespace的用法,以及extends属性
- namespace的用法
- [Flex]Flex编程注意之Namespace的用法
- namespace用法
- namespace 的用法
- Struts2中namespace的用法
- namespace的用法
- Flex Namespace的用法
- using namespace std用法详解
- php中namespace use用法实例分析
- namespace的用法
- using namespace std 的用法