例如:Action中有一个全局对象dictionary,对象有种A,B,C三个属性。

1、通过后台将Action中的值传到jsp,需要el表达式。

页面取到A的值

<input name="随便起名字" value="{dictionary.A}">

2.如果想讲页面的值传到后台 可以通过提交表单方式 将A传到后台,

form中的name可以随便起

name不能随便起名字

<form role="form" >

  <input name="dictionary.A" value="">

</form>

form中主要是为了给Ajax传序列化参数,例如如下

var param = $("#addChaForm").serialize();

相关文章:

  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2021-04-03
  • 2021-11-28
  • 2021-08-02
  • 2021-11-11
猜你喜欢
  • 2021-07-26
  • 2022-12-23
  • 2022-01-10
  • 2022-12-23
  • 2021-08-16
  • 2021-10-08
  • 2022-12-23
相关资源
相似解决方案