我的意思就是想在STURTS标签里面还能象以前普通的页面一样的调用JAVASCRIPT里面的函数

解决方案 »

  1.   

    action的值没写肯定是会出错的
      

  2.   

    action="" 这里为空,所以报错了
     把name改为styleId
      

  3.   

    把这个<html:form action="" method="" onClick="return check()" name="form">
    改成<html:form action="" method="" onsubmit="return check();" name="form">试试
      

  4.   

    <html:form action="untitled1Action.do">
      <html:submit  property="sdfdfsfd" onclick="test1();"> 
      </html:submit></html:form>
    或者
     <html:form action="untitled1Action.do" onsubmit="test1();">
      <html:submit  property="sdfdfsfd" > 
      </html:submit></html:form>在test1()方法重要返回true或者false
    其它配置没有问题就不会有问题
      

  5.   

    还没解决呢? <html:form>中只要出现name属性就会报错,这个是什么原因?
      

  6.   

    老大好像<html:form>中没有name的属性,可以这样写的,你可以试试!<SCRIPT LANGUAGE="JAVASCRIPT">
    <!--
    function check()
    {
    ......
    }
    //-->
    </SCRIPT>
    <html:form action="*.do" method="post" onClick="return check()" ><script>
    document.forms[0].name="form1";
    document.forms[0].id="form1";
    </script><html:submit/>
    </html>
      

  7.   

    <html:form action="/xx.do" method="post" onsubmit="return check();">
      

  8.   

    我就是想判断form中的一个text的VALUE是否为空
    在不用标签的情况下
    script中的函数可以写成
    function check()
    {
    if(document.form1.text.value=="")
    {
    alert("!!!!!!");
    }
    }
    但是<html:form>中没有name这个属性,如果有两个form我的script中就无法找到是哪个form的text的值了,我的意思就是说用了<html:form>还能不能象以前那样在script函数中指定是哪个form中的text ,比如这样写document.form1.text.value各位大侠不知道我现在说没说清楚,本人采鸟,请见量!!!!!!!!!!!
      

  9.   

    你直接写formbean的名称就可以了,默认下,form 的Name 和formbean的名称一样,
    所以你把form1改为你formbean的名称就可以了。