java jsp if else if_jsp页面使用if else语句 | 学步园
jsp頁面嵌入java語句使用即可,但是在使用if else語句時一定要注意使用是標點的使用,在語句中分號不能寫,不符合jsp頁面的語法規則,若多寫了則會報錯:如下:
{name: 'priceRA', type: 'string'},?
{name: 'priceRB', type: 'string'},?
{name: 'priceRC', type: 'string'},
{name: 'priceRD', type: 'string'},
{name: 'priceFA', type: 'string'},
{name: 'priceFB', type: 'string'},
{name: 'priceFC', type: 'string'},
{name: 'priceFD', type: 'string'},
則會報很多相關else的錯誤,但是若把分號去掉則ok了!!如換成以下代碼則會正常運行:
{name: 'priceRA', type: 'string'},
{name: 'priceRB', type: 'string'},
{name: 'priceRC', type: 'string'},
{name: 'priceRD', type: 'string'},
{name: 'priceFA', type: 'string'},
{name: 'priceFB', type: 'string'},
{name: 'priceFC', type: 'string'},
{name: 'priceFD', type: 'string'},
總結
以上是生活随笔為你收集整理的java jsp if else if_jsp页面使用if else语句 | 学步园的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 发动机突然出现呼呼的声音?
- 下一篇: springcloud 相同服务名_浅谈