本帖最后由 ya2424021 于 2014-07-19 15:47:25 编辑

解决方案 »

  1.   

    由于jquery对于获取元素进行了各种情况的封装,#inventorybeo.supplier 会被认为 id为inventorybeo 并且class中包含supplier 的元素,很明显是不存在的,所以你要对于. 做下转义处理,提供如下两种方式
    function searchContactorsAndBank()
    {
    alert($('#inventorybeo\\.supplier').val());

    alert(document.getElementById('inventorybeo.supplier').value);

    }