php代码
------------------------------
//对文件进行写操作
function writeValueFile(){
//可以修改的,文件名。
$writeFilename = 'keyvalue.properties';print "不能打开文件 $writeFilename";
exit;
}
html页面
--------------------------------------
<input type="submit" name="Submit" value="保存" onclick=writeValueFile();>你真强,一个是客户端,一个是服务器端

解决方案 »

  1.   

    偶刚开始写php的代码,青椒一下了。
      

  2.   

    <form name="form1" method="post"   onsubmit=loginUser();>
    你这里是默认提交给自己了!你的想法真独特!
      

  3.   

    没有写清或者没有写:action=""  那就是提交给自己了晕。。
      

  4.   

    我上面写了对action的赋值了。
    function loginUser(){
    if (checkValue()){
       form1.action="setvalue.php";
       form1.submit();
    }
    }
      

  5.   

    onclick=writeValueFile();
    你在客户端调用php函数?如果你不想刷新页面,可以ajax