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()
  • 相关阅读:
    linux 挂载本地iso
    安装python
    QT中如何使用MYSQL 以及静态编译QT中如何加上MYSQL(2)
    qt中如何使用mysql 以及静态编译qt中如何加上mysql(1)
    关于写qt项目时的代码格式问题
    qt相关学习以及 qt creator如何静态编译
    Qt Creator中如何在QLabel上画矩形框并且保存画完后的图形
    android localsocket 传输大量数据的问题
    android binder使用demo
    android binder使用
  • 原文地址:https://www.cnblogs.com/Amity/p/2977773.html
Copyright © 2011-2022 走看看