zoukankan      html  css  js  c++  java
  • 杂记

    Question.htm页面以弹出窗口显示
     
    <tr>
                            <td class="loginQuestion">
                                <ahref="javascript:window.showModalDialog('Question.htm','','dialogWidth:520px;dialogHeight:600px; dialogTop:'+(window.screen.availHeight-600)/2+';dialogLeft:'+(window.screen.availWidth -500)/2 +';scroll:yes;resizable:no;status:no')">ID and Password Questions</a>
                                <p />
                                <a class="loginQuestion" href="#"></a>
                            </td>
                        </tr>
     
    2
    <a href="javascript:Clearform();">
     
    href可以调用js的方法
     
    3
    textbox写在后台的鼠标事件
    txtSearch.Attributes["onkeypress"= "var textSearch = document.getElementById('" +txtSearch.ClientID + "'); textSearch.style.color='Black';if (event.keyCode==13)   {  clickObj(document.getElementById(\"aGoLink\"));   return   false;}";
                    txtSearch.Attributes["onfocus"= var textSearch = document.getElementById('" +txtSearch.ClientID + "');if(document.activeElement.id   ==   this.id && (textSearch.value.Trim()=='EAI/APM Code/App. Name/Alias'|| textSearch.value.Trim()=='No Matching Records Found.')) { textSearch.style.fontSize='14px';textSearch.style.color='Black';textSearch.value='';}";
    txtSearch.Attributes["onBlur"= var textSearch = document.getElementById('" + txtSearch.ClientID+ "');if (textSearch.value.Trim()==''){textSearch.style.fontSize='11px';textSearch.value = ' EAI/APM Code/App. Name/Alias ';textSearch.style.color = '#cccccc';}";
     
    4
    function IsAuthenticated()
        {
            /* Create a new XMLHttpRequest object to talk to the Web server */
            /*@cc_on @*/
            /*@if (@_jscript_version >= 5)
            try {
              xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
            catch (e) {
              try {
                xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
              catch (e2) {
                xmlHttp = false;
              }
            }
            @end @*/
            if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
              xmlHttp = new XMLHttpRequest();
            }
            //xmlHttp = new ActiveXObject("Microsoft.XMLHttp");
            xmlHttp.open("GET", "WebAjaxIsAuthenticated.aspx?r=" +new Date().getTime(), false);
            xmlHttp.send(null);
            if (xmlHttp.readyState == 4) {
                response = xmlHttp.responseText;
                //alert(response);
                if(response=="0")
                    return(true);
                else
                    return(false);
            }
            return(false);
        }
     
    public partial class WebAjaxIsAuthenticated : System.Web.UI.Page
        {
            protected void Page_Load(object senderEventArgs e)
            {
     
                if (HttpContext.Current.User.Identity.Name.ToString() != "" &&
                    (Session["UserAutorization"as UserAuthorization!= null)
                    Response.Write(0);
                else
                    Response.Write(1);
                Response.End();
            }
    }
     
    6
    Textbox以横线的形式显现
      <input id="txtEventName" maxlength="100" runat="server"
                  type="text" class="textBoxStyle" style="width: 120px" />
     
    .textBoxStyle
    {
          border-left-stylenone;
          border-left-width0px;
          border-right-stylenone;
          border-right-width0px;
          border-top-stylenone;
          border-right-width0px;
          border-bottom-stylesolid;
          border-bottom-width1px;
          font-familyverdana , Arial, Helvetica, sans-serif;
          font-size0.69em;
    }
    10
    后台执行js
    Page.ClientScript.RegisterStartupScript(this.GetType(), "fi1"initializtionScripts);
    11
    var url = '<%=this.ResolveUrl("~/HolidayCalendar/WebAjaxExportHolidayCalendar.aspx")%>' + '?' +queryString;
    document.getElementById("exportFrame").src = url;
    ResolveUrl是把服务器的url解析为绝对路径
    12
    window.top.location.reload();会重新执行页面(包括pageload()
  • 相关阅读:
    Hadoop 学习笔记 (十) hadoop2.2.0 生产环境部署 HDFS HA Federation 含Yarn部署
    hadoop 2.x 安装包目录结构分析
    词聚类
    Hadoop 学习笔记 (十一) MapReduce 求平均成绩
    Hadoop 学习笔记 (十) MapReduce实现排序 全局变量
    Hadoop 学习笔记 (九) hadoop2.2.0 生产环境部署 HDFS HA部署方法
    Visual Studio Code 快捷键大全(Windows)
    Eclipse安装教程 ——史上最详细安装Java &Python教程说明
    jquery操作select(取值,设置选中)
    $.ajax 中的contentType
  • 原文地址:https://www.cnblogs.com/Amity/p/2977773.html
Copyright © 2011-2022 走看看