如何在php中得到js函数的返回值 已经提交了,但是没有值。用value=return foo(sendername)或者value="return foo(sendername)",得到的值是return.正确的该怎么用呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <?phpprint_r($_POST);?><script language=javascript>String.prototype.lenb = function() { return this.replace(/[^\x00-\xff]/g,"**").length;}function foo(form) { form.sen.value = form.sendername.value.lenb(); return true}</script><form method=post onsubmit="return foo(this)"><input type=hidden name=sen><input type=text name=sendername><input type=submit></form> xuzuning(唠叨) 还是不行,我需要得到这个字节数具体值,在下一页面来进行判断。而且有两个文本框,都要判断。 xuzuning(唠叨):现在可以了,我把双引号,换成了单引号。谢谢! php页面与php可扩展模块之间如何传递结构参数 请释疑:PHP这种怪异语法 请教一个文本存放的问题,没搞明白怎么整 求像CSDN左边树型菜单的源码(PHP+MYSQL) mail怎么发送图片 急问个easyphp问题,装前是不是要先装mysql,apache,php呀? 郁闷问题!!!!请求高手帮忙!!! 除数据库外,还可以用什么存数据,进行修改和取读? 关于存储过程嵌套以及递归的问题?(PHP调用,高手请进,在线等) 如何安装mysql? 一时好奇,动态改变图片上文字的php程序怎么做的?给点源代码 如何 生成订单编号 ?
print_r($_POST);
?>
<script language=javascript>
String.prototype.lenb = function() {
return this.replace(/[^\x00-\xff]/g,"**").length;
}function foo(form) {
form.sen.value = form.sendername.value.lenb();
return true
}
</script>
<form method=post onsubmit="return foo(this)">
<input type=hidden name=sen>
<input type=text name=sendername>
<input type=submit>
</form>
而且有两个文本框,都要判断。