Not Equal C && !=C && 不等于西
RSS icon Email icon Home icon
  • jQuery $.ajax()/$.get() function always get same value for IE

    Posted on June 19th, 2014 Sean Add comments

         When I was trying to use jQuery $.ajax() or $.get() function retrieve some random value from the server side, it’s working fine on firefox or chrome, but not IE. The server side code like below (written in ASP.NET MVC):

         The client side code:

         I’m supposed to get a random number every time I click the link, but in IE, always same one returned. Regarding Craic Computing’s Blog, that’s because IE will cache the value first returned, and trade rest requests as identical by default, so it won’t update the value since the request URL never change.
         To fix this issue, just disable cache in the jQuery function as following:

  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading...Loading...
    16 views
  • Set “height” property in CSS of a link

    Posted on June 25th, 2013 Sean Add comments

         By default, the tag <a> is an inline element, there is no way to set custom height for it. It only changes along with the text size. But you can change it to be block in order to set a custom height like below:

  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading...Loading...
    6 views
  • CSS中的id与class小感

    Posted on October 14th, 2008 Sean Add comments

         最近闲来无事,做了一些基于CSS层叠格式的HTML网页。coding中,对id与class两种调用方式偶有小感。
         理论上讲,id通常用于定义页面上一个仅出现一次的标记,或称其具有唯一性;而class是用来根据用户定义的标准对一个或多个元素进行定义的,换句话说,具有重复性——可重复使用。
         举个简单的例子:

         总的来说,在网页中,如果计划会有许多分项来说明不同问题,一般用id,即使将来增加新分项,也只用增加新id而已;然而如果每个分项都会有一些相同的内容,譬如颜色、表格、字体、分栏等等,使用class会比较有效。

  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading...Loading...
    254 views