demo1. 模拟用字符串调用js 函数 function dataQuery() { var strFun = "testCallBack"; var strParam = "param"; //Create the function var fn = window[strFun]; //Call the function fn(strParam); } function testCallBack(str) { alert(str); } demo2. 模拟spr
在Controller中接收到的POST参数如果是中文的话,显示为乱码.已知客户端传过来时编码为UTF-8. 问题产生分析: spring MVC中默认的编码格式为“ISO-8859-1”,因此造成乱码. 简单的解决方式: New String(request.getParameter("xxx").getBytes("iso-8859-1"),"utf-8") 最好的解决方式: 在web.xml中配置Spring字符过滤器,添加: <!-
upauth:function(){ var record = myForm.getRecord(); var companywyId = record.get("companyId"); var companywytype =record.get("companyType"); var url = $$pageContextPath + 'uploadAuth/?companywyId='+companywyId+'&companywytype='+com
<?php namespace App\Http\Controllers; use App\User; use Illuminate\Http\Request; class RegisterController extends Controller { //注册页面: public function index() { return view('register.index'); } //注册行为: public function register() { //验证: $this->valid
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Redirect; class LoginController extends Controller { //登录页面: public function index() { return view('login.index');