zoukankan      html  css  js  c++  java
  • 表单上添加按钮

    //百度查询
    function baiduselect() {
    var name = document.getElementById('name').value;//中标单位
    if (name != null) {
    window.open("http://www.baidu.com/baidu?tn=baidu&word=" + name);
    }
    else {
    window.open("http://www.baidu.com/");
    }
    }

    //在字段后边添加按钮
    function addButton() {
    document.getElementById('name').style.width = "85%";
    document.getElementById('name_d').innerHTML += "<INPUT style='WIDTH: 30px' id='btnselect' onclick='baiduselect(); ' value='百度' type='button'>";

    //roll12需如此
    // document.getElementById('name').parentElement.innerHTML += "<INPUT style='WIDTH: 15%' id='btnselect' onclick='baiduselect2()' value='百度' type='button'>";

    document.getElementById('name_c').innerHTML = "<LABEL for=name>客户名称<IMG class="ms-crm-ImageStrip-frm_required" alt=必需 src='/_imgs/imagestrips/transparent_spacer.gif?ver=1182336326'></LABEL><LABEL class="ms-crm-Hidden-NoBehavior" for=name>必需</LABEL>";
    }

    function addsave() {
    Xrm.Page.getAttribute('name').setValue(document.getElementById('name').value);
    if (Xrm.Page.getAttribute('name').getValue() == null )
    {
    alert("客户名称必需输入");
    event.returnValue = false;
    return false;
    }

    }

  • 相关阅读:
    JS调试时返回结果有内容却显示数组长度为0或对象内容为空
    python模块学习之six模块
    python学习之ansible api
    python模块学习之collections
    python模块学习之json
    Tomcat闲聊第二话
    HTTP解读
    实用的工具
    mysql数据库记录
    python模块学习之__future__
  • 原文地址:https://www.cnblogs.com/z1984/p/2948027.html
Copyright © 2011-2022 走看看