[英]Validate form replace text textarea
I have a validation form checker - when my checkbox has the value of 1 - i want to replace some text in the TextArea with new Text. 我有一个验证表单检查器-当我的复选框的值为1时-我想用新的Text替换TextArea中的一些文本。 Does anyone know the correct code to do this?
有人知道执行此操作的正确代码吗?
everything else in the form checker works, except this one. 除了这一点以外,表单检查器中的其他所有内容均有效。
function validateForm(myForm){
if (getRadioSelected(myForm.myCheckBox) == 1) {
myForm.myTextArea.value.replace("Old Text","Replacement Text");
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.